Salome HOME
Allow smeshBuilder.New(salome.myStudy) but print a warning
[modules/smesh.git] / src / SMESH_SWIG / smeshBuilder.py
index e38c0c71a1cde07b54bf642ecd26af3d3124ec33..38fba8060ecffc4cd6cf3d0107a21dd8c083def9 100644 (file)
@@ -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