]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
zcrack plugin disabled if eficas isn't installed
authorRenaud Nédélec <renaud.nedelec@opencascade.com>
Fri, 28 Mar 2014 14:12:42 +0000 (15:12 +0100)
committerRenaud Nédélec <renaud.nedelec@opencascade.com>
Mon, 31 Mar 2014 09:22:10 +0000 (11:22 +0200)
src/Tools/smesh_plugins.py

index 2ec28ecf03e7cec8cd08d02f5f283610e5b35a49..1eec49c1fdcc62cc1da9737931256b05d4178334 100644 (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)