Salome HOME
0019827: EDF 736 GEOM : Duplication of a object along an elliptic path
[modules/geom.git] / src / GEOM_I / GEOM_DumpPython.cc
index 2d650b884a13e7224231bbab9801001c0d2bd110..8f545f63ec88fa9c80e8b74a76c4080e25c9316c 100644 (file)
@@ -15,7 +15,7 @@
 // License along with this library; if not, write to the Free Software 
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 #ifdef WNT
 #pragma warning( disable:4786 )
@@ -68,6 +68,19 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
       "### of GEOM component\n\n";
   aScript += _impl->DumpPython(aStudy->StudyId(), aMap, isPublished, isValidScript);
 
+  if (isPublished)
+  {
+    //Output the script that sets up the visual parameters.
+    char* script = aStudy->GetDefaultScript(ComponentDataType(), "\t");
+    if (script && strlen(script) > 0) {
+      aScript += "\n\t### Store presentation parameters of displayed objects\n";
+      aScript += script;
+      CORBA::string_free(script);
+    }
+  }
+
+  aScript += "\n\tpass\n";
+
   int aLen = aScript.Length(); 
   unsigned char* aBuffer = new unsigned char[aLen+1];
   strcpy((char*)aBuffer, aScript.ToCString());