#include "utilities.h"
#include <cctype>
-#include <strstream>
+#include <sstream>
#include <functional>
#include <QString>
case MT_O_PLUS: aParam1 = "MT_O_PLUS"; break;
case MT_O_STAR: aParam1 = "MT_O_STAR"; break;
case MT_O_X: aParam1 = "MT_O_X"; break;
+ case MT_POINT_SPRITE: aParam1 = "MT_POINT_SPRITE"; break;
default: aParam1 = "MT_NONE"; break;
}
switch( aMarkerScale ) {
case MS_60: aParam2 = "MS_60"; break;
case MS_65: aParam2 = "MS_65"; break;
case MS_70: aParam2 = "MS_70"; break;
- default: aParam2 = "MT_NONE"; break;
+ default: aParam2 = "MS_NONE"; break;
}
+ if( aMarkerType == MT_POINT_SPRITE )
+ aParam2 = "MS_NONE";
theStr<<thePrefix<<theName<<".SetMarkerStd(VISU."<<aParam1<<", VISU."<<aParam2<<")"<<endl;
}
else {
CORBA::Long aNbRows = theTableAttr->GetNbRows();
// push values and their indices into streams
- strstream values, rows, columns;
+ stringstream values, rows, columns;
string comma = "";
for(CORBA::Long i = 1; i <= aNbColumns; i++){
for(CORBA::Long j = aNbRows; j > 0; j--){
}
}
// push titles and units into streams
- strstream rowUnits, rowTitles, colTitles;
+ stringstream rowUnits, rowTitles, colTitles;
SALOMEDS::StringSeq_var aRowUnits = theTableAttr->GetRowUnits();
SALOMEDS::StringSeq_var aRowTitles = theTableAttr->GetRowTitles();
comma = "";
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;