From: eap Date: Wed, 4 Jul 2018 11:57:53 +0000 (+0300) Subject: Allow smeshBuilder.New(salome.myStudy) but print a warning X-Git-Tag: SHAPER_V9_1_0RC1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ed26bf4db7ca95b5fcb33ee167556f841840b98e;p=modules%2Fsmesh.git Allow smeshBuilder.New(salome.myStudy) but print a warning --- diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index e38c0c71a..38fba8060 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1416,7 +1416,6 @@ def New( instance=None, instanceGeom=None): smesh = smeshBuilder.New() Parameters: - study: SALOME study, generally obtained by salome.myStudy. instance: CORBA proxy of SMESH Engine. If None, the default Engine is used. instanceGeom: CORBA proxy of GEOM Engine. If None, the default Engine is used. Returns: @@ -1425,6 +1424,10 @@ def New( instance=None, instanceGeom=None): global engine global smeshInst global doLcc + if instance and isinstance( instance, SALOMEDS._objref_Study ): + import sys + sys.stderr.write("Warning: 'study' argument is no more needed in smeshBuilder.New(). Consider updating your script!!!\n\n") + instance = None engine = instance if engine is None: doLcc = True