X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2Fsmesh_plugins.py;h=2b2ad4b603230b1fa0971875e803f60d2df603dd;hp=52a886f3c8bfc48b6d9d1806e765da66cffdb1ae;hb=1a3a88cfc996394b2c79f2cf374c8f3c4140f036;hpb=6a6636fcc651eb96134a81ea1efa651944a3fade diff --git a/src/Tools/smesh_plugins.py b/src/Tools/smesh_plugins.py index 52a886f3c..2b2ad4b60 100644 --- a/src/Tools/smesh_plugins.py +++ b/src/Tools/smesh_plugins.py @@ -17,9 +17,10 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# Author : Guillaume Boulant (EDF) +# Author : Guillaume Boulant (EDF) # import salome_pluginsmanager +import os try: from spadderPlugin import runSpadderPlugin @@ -42,11 +43,11 @@ except: try: from yamsplug_plugin import YamsLct - salome_pluginsmanager.AddFunction('ReMesh with MGSurfOpt ( formerly Yams )', + salome_pluginsmanager.AddFunction('ReMesh with MGSurfOpt', 'Run Yams', YamsLct) except: - salome_pluginsmanager.logger.info('ERROR: MGSurfOpt (Yams) plug-in is unavailable') + salome_pluginsmanager.logger.info('ERROR: MGSurfOpt plug-in is unavailable') pass try: @@ -75,15 +76,16 @@ except: salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable') pass -# ZCracks plugin requires the module EFICAS to be installed -# thus it is first tested if this module is available before -# adding the plugin to salome_pluginsmanager +# ZCracks plugin requires the Zcracks tool try: - import eficasSalome - from zcracks_plugin import ZcracksLct - salome_pluginsmanager.AddFunction('Run Zcrack', - 'Run Zcrack', - ZcracksLct) + zcracksHome=os.environ['ZCRACKSHOME'] + if len(zcracksHome) > 1: + #print 'ZCRACKSHOME ', zcracksHome + from Zcracks.zcracks_plugin import ZcracksLct + salome_pluginsmanager.AddFunction('Run Zcrack', + 'Run Zcrack', + ZcracksLct) except: + #print 'probleme zcracks' salome_pluginsmanager.logger.info('ERROR: Zcrack plug-in is unavailable') pass