zcrack plugin disabled if eficas isn't installed

This commit is contained in:
Renaud Nédélec 2014-03-28 15:12:42 +01:00
parent 985e3a3629
commit fa6a0c1c31

View File

@ -24,7 +24,6 @@ import salome_pluginsmanager
from spadderPlugin import runSpadderPlugin
from meshcut_plugin import MeshCut
from yamsplug_plugin import YamsLct
from zcracks_plugin import ZcracksLct
from MGCleanerplug_plugin import MGCleanerLct
from blocFissure.ihm.fissureCoude_plugin import fissureCoudeDlg
@ -47,6 +46,15 @@ salome_pluginsmanager.AddFunction('ReMesh with MGCleaner',
salome_pluginsmanager.AddFunction('Meshed Pipe with a crack',
'Create a mesh with blocFissure tool',
fissureCoudeDlg)
salome_pluginsmanager.AddFunction('Run Zcrack',
'Run Zcrack',
ZcracksLct)
enable_zcracks = True
try:
import eficasSalome
except:
enable_zcracks = False
if enable_zcracks:
from zcracks_plugin import ZcracksLct
salome_pluginsmanager.AddFunction('Run Zcrack',
'Run Zcrack',
ZcracksLct)