From: Paul RASCLE Date: Wed, 26 Aug 2020 09:37:59 +0000 (+0200) Subject: allow SMESH publishing in GUI X-Git-Tag: SH_V2_2_0~73 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b37ba5d8046be7ad70904c2cfd21f12b441dba4e;p=modules%2Fhydro.git allow SMESH publishing in GUI --- diff --git a/src/HYDROTools/shapesGroups.py b/src/HYDROTools/shapesGroups.py index 1ed9e63b..298b29a0 100644 --- a/src/HYDROTools/shapesGroups.py +++ b/src/HYDROTools/shapesGroups.py @@ -23,7 +23,8 @@ def freeBordersGroup(meshFileIn, meshFileOut=""): return full path of the output mesh file """ smesh = smeshBuilder.New() - smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed + if not salome.sg.hasDesktop(): + smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed ([MESH], status) = smesh.CreateMeshesFromMED(meshFileIn) nbAdded, MESH, addedBnd = MESH.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [])