Fixed problem with dump study and remove parameter "theStudy" in python function "RebuildData()"

This commit is contained in:
imn 2016-11-28 17:35:53 +03:00
parent d7a541ca3d
commit 5ea1135dda
2 changed files with 9 additions and 6 deletions

View 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);

View 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
#