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=3c81d72fa64e98559c8ec7cfc85c354440c5f0da;hb=1746a461949c030eb46ccb860e586ade2e5de5e3;hpb=8408df59c58cdda76191f1edc7ee3811c9ab54c8 diff --git a/src/Tools/smesh_plugins.py b/src/Tools/smesh_plugins.py index 3c81d72fa..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 @@ -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