From ed26bf4db7ca95b5fcb33ee167556f841840b98e Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 4 Jul 2018 14:57:53 +0300 Subject: [PATCH] Allow smeshBuilder.New(salome.myStudy) but print a warning --- src/SMESH_SWIG/smeshBuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.2