From fa6a0c1c316abc62ada8c4d33c216da3bcfffd61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Renaud=20N=C3=A9d=C3=A9lec?= Date: Fri, 28 Mar 2014 15:12:42 +0100 Subject: [PATCH] zcrack plugin disabled if eficas isn't installed --- src/Tools/smesh_plugins.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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) -- 2.39.2