- import eficasSalome
- from zcracks_plugin import ZcracksLct
- salome_pluginsmanager.AddFunction('Run Zcrack',
- 'Run Zcrack',
- ZcracksLct)
-except:
- salome_pluginsmanager.logger.info('ERROR: Zcrack plug-in is unavailable')
+ zcracksHome=os.environ['ZCRACKSHOME']
+ if len(zcracksHome) > 1:
+ #print 'ZCRACKSHOME ', zcracksHome
+ from Zcracks.zcracks_plugin import ZcracksLct
+ salome_pluginsmanager.AddFunction('Run Zcracks',
+ 'Add a crack in a mesh with Zcracks plug-in',
+ ZcracksLct)
+except Exception as e:
+ #print 'probleme zcracks'
+ salome_pluginsmanager.logger.info('ERROR: Zcrack plug-in is unavailable: {}'.format(e))