From: Renaud Nédélec Date: Fri, 28 Mar 2014 14:12:42 +0000 (+0100) Subject: zcrack plugin disabled if eficas isn't installed X-Git-Tag: V7_4_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fa6a0c1c316abc62ada8c4d33c216da3bcfffd61;p=modules%2Fsmesh.git zcrack plugin disabled if eficas isn't installed --- diff --git a/src/Tools/smesh_plugins.py b/src/Tools/smesh_plugins.py index 2ec28ecf0..1eec49c1f 100644 --- a/src/Tools/smesh_plugins.py +++ b/src/Tools/smesh_plugins.py @@ -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)