X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_DumpPython.cc;h=8f545f63ec88fa9c80e8b74a76c4080e25c9316c;hb=f3c5197b3c91cac93dbd56a2462943bf82e81b51;hp=6b71e1551be95042c69ae183b21f716eb7aca6a7;hpb=f931ebe5b663153f8e276d607d870aa401a91048;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_DumpPython.cc b/src/GEOM_I/GEOM_DumpPython.cc index 6b71e1551..8f545f63e 100644 --- a/src/GEOM_I/GEOM_DumpPython.cc +++ b/src/GEOM_I/GEOM_DumpPython.cc @@ -1,3 +1,22 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// 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/ or email : webmaster.salome@opencascade.com +// #ifdef WNT #pragma warning( disable:4786 ) #endif @@ -45,10 +64,23 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, } TCollection_AsciiString aScript = - "### This file is generated by SALOME automatically by dump python funcitonality\n" + "### This file is generated by SALOME automatically by dump python functionality\n" "### 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());