}
Engines::TMPFile* VISU_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean theIsPublished,
+ CORBA::Boolean theIsMultiFile,
CORBA::Boolean& theIsValidScript)
{
- return myVisuGen->DumpPython(theStudy, theIsPublished, theIsValidScript);
+ return myVisuGen->DumpPython(theStudy, theIsPublished, theIsMultiFile, theIsValidScript);
}
VISU::ColoredPrs3dCache_ptr
// inherited methods from Engines::Component
virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean theIsPublished,
+ CORBA::Boolean theIsMultiFile,
CORBA::Boolean& theIsValidScript);
virtual
VISU_Gen_i::
DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean theIsPublished,
+ CORBA::Boolean theIsMultiFile,
CORBA::Boolean& theIsValidScript)
{
theIsValidScript = false;
#define aStr cout
#endif
- std::string aPrefix(PREFIX);
- aStr<<"def RebuildData(theStudy):"<<endl;
+ std::string aPrefix = theIsMultiFile ? PREFIX : "";
+ if( theIsMultiFile )
+ aStr<<"def RebuildData(theStudy):"<<endl;
aStr<<aPrefix<<"from batchmode_salome import orb, naming_service, lcc, myStudyManager"<<endl;
aStr<<aPrefix<<"import SALOME_MED"<<endl;
aStr<<aPrefix<<"import SALOMEDS"<<endl;
aStr<<aPrefix<<"import VISU"<<endl;
aStr<<aPrefix<<"import visu"<<endl;
aStr<<endl;
+ if( !theIsMultiFile )
+ aStr<<"theStudy = salome.myStudy"<<endl;
aStr<<aPrefix<<"aVisu = visu.Initialize(orb,naming_service,lcc,myStudyManager,theStudy,0)"<<endl;
aStr<<aPrefix<<"aSComponent = visu.PublishComponent(theStudy)"<<endl;
aStr<<aPrefix<<"aMed = lcc.FindOrLoadComponent('FactoryServer','MED')"<<endl;
}
}
- aStr<<aPrefix<<"pass"<<endl;
+ if( theIsMultiFile )
+ aStr<<aPrefix<<"pass"<<endl;
if(theIsPublished) { //SRN: define function for Animation
+ aPrefix = PREFIX;
+
//Define a function that find a SObject by its father's path and its name
aStr<<endl;
aStr<<endl;
Engines::TMPFile*
DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean theIsPublished,
+ CORBA::Boolean theIsMultiFile,
CORBA::Boolean& theIsValidScript);
// inherited methods from SALOMEDS::Driver