]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fixed problem with dump study and remove parameter "theStudy" in python function...
authorimn <imn@opencascade.com>
Mon, 28 Nov 2016 14:35:53 +0000 (17:35 +0300)
committerimn <imn@opencascade.com>
Mon, 28 Nov 2016 14:35:53 +0000 (17:35 +0300)
src/GEOM/GEOM_Engine.cxx
src/GEOM_SWIG/geomBuilder.py

index abcd110d65b58b82fb566a49c0caa87dac46921e..de65b60d4dde9fa27e5900f08011d4fb72c3ead1 100644 (file)
@@ -588,18 +588,21 @@ TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObj
   {
     TCollection_AsciiString anEmptyScript;
     if( isMultiFile )
-      anEmptyScript = "def RebuildData(theStudy): pass\n";
+      anEmptyScript = "def RebuildData(): pass\n";
     return anEmptyScript;
   }
+  
+  if( isMultiFile )
+    aScript  = "import salome\n";
 
-  aScript  = "import GEOM\n";
+  aScript += "import GEOM\n";
   aScript += "from salome.geom import geomBuilder\n";
   aScript += "import math\n";
   aScript += "import SALOMEDS\n\n";
   if( isMultiFile )
-    aScript += "def RebuildData(theStudy):";
+    aScript += "def RebuildData():";
 
-  aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n";
+  aScript += "\n\tgeompy = geomBuilder.New(salome.myStudy)\n";
 
   AddTextures(aScript);
 
index 0aad1be10643141cc5c963b93810dc1870bd0745..69bbe46b0531b9ab717dbecc059226c4096f4c03 100644 (file)
@@ -831,12 +831,12 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
 
         ## Dump component to the Python script
         #  This method overrides IDL function to allow default values for the parameters.
-        def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
+        def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
             """
             Dump component to the Python script
             This method overrides IDL function to allow default values for the parameters.
             """
-            return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
+            return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
 
         ## Get name for sub-shape aSubObj of shape aMainObj
         #