Salome HOME
PR: dump new init mode
[modules/smesh.git] / src / SMESH_I / SMESH_DumpPython.cxx
index b609c57501ef9d686398557ee7507a9d9dfeb5dc..200ed9ec34adebbb356d5d885f5fa5a7af607515 100644 (file)
@@ -831,9 +831,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   aScript += helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()\n\t";
   aScript += helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()\n\t";
   if ( isPublished )
   aScript += helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()\n\t";
   aScript += helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()\n\t";
   if ( isPublished )
-    aScript += aSMESHGen + ".SetCurrentStudy(theStudy)";
+    aScript += aSMESHGen + " = smeshDC.smeshInstance(theStudy)";
   else
   else
-    aScript += aSMESHGen + ".SetCurrentStudy(None)";
+    aScript += aSMESHGen + " = smeshDC.smeshInstance(None)";
 
   // import python files corresponding to plugins
   set<string> moduleNameSet;
 
   // import python files corresponding to plugins
   set<string> moduleNameSet;
@@ -963,7 +963,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   TCollection_AsciiString initPart = "import ";
   if ( isMultiFile )
     initPart += helper + "salome, ";
   TCollection_AsciiString initPart = "import ";
   if ( isMultiFile )
     initPart += helper + "salome, ";
-  initPart += aSmeshpy + ", SMESH, SALOMEDS\n";
+  initPart += " smeshDC, SMESH, SALOMEDS\n";
   if ( importGeom && isMultiFile )
   {
     initPart += ("\n## import GEOM dump file ## \n"
   if ( importGeom && isMultiFile )
   {
     initPart += ("\n## import GEOM dump file ## \n"