]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021256: EDF STUDY: Python dump in a single file (continued)
authoreap <eap@opencascade.com>
Tue, 3 May 2011 15:54:20 +0000 (15:54 +0000)
committereap <eap@opencascade.com>
Tue, 3 May 2011 15:54:20 +0000 (15:54 +0000)
   if( isMultiFile )
     aScript += "def RebuildData(theStudy):";
-  else
-    aScript += "theStudy = salome.myStudy";

src/SMESH_I/SMESH_DumpPython.cxx

index 02438ddcfd63e3beee2e8294dac98b0d314ab7fa..34650357d5d8f44672ed4f23427e21af7d70a467 100644 (file)
@@ -730,8 +730,6 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   TCollection_AsciiString aScript;
   if( isMultiFile )
     aScript += "def RebuildData(theStudy):";
-  else
-    aScript += "theStudy = salome.myStudy";
   aScript += "\n\t";
   aScript += helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()\n\t";
   aScript += helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()\n\t";
@@ -856,8 +854,8 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   }
 
   // set initial part of aSript
-  TCollection_AsciiString initPart = "import salome, SMESH, SALOMEDS\n";
-  initPart += helper + "import " + aSmeshpy + "\n";
+  TCollection_AsciiString initPart;
+  initPart += helper + "import " + aSmeshpy + ", SMESH, SALOMEDS\n";
   if ( importGeom && isMultiFile )
   {
     initPart += ("\n## import GEOM dump file ## \n"