value = refObj->GetName();
QString path(theStudy->GetObjectPath(father));
//The following code requierd as a field name can contain '/' character
- theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,getSObjectByFatherPathAndName(theStudy, '"<<path.toLatin1().data()<<"', '"<<value.toLatin1().data()<<"'))"<<endl;
+ theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,visu.getSObjectByFatherPathAndName(theStudy, '"<<
+ path.toLatin1().data()<<"', '"<<value.toLatin1().data()<<"'))"<<endl;
}
value = anObj->GetName();
if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(fieldSO, '"<<value.toLatin1().data()<<"')"<< endl;
value = refObj->GetName();
QString path(theStudy->GetObjectPath(father));
//The following code requierd as a field name can contain '/' character
- theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,getSObjectByFatherPathAndName(theStudy, '"<<path.toLatin1().data()<<"', '"<<value.toLatin1().data()<<"'))"<<endl;
+ theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,visu.getSObjectByFatherPathAndName(theStudy, '"<<
+ path.toLatin1().data()<<"', '"<<value.toLatin1().data()<<"'))"<<endl;
}
value = anObj->GetName();
if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(fieldSO, '"<<value.toLatin1().data()<<"')"<< 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;
-
- aStr<<"def getSObjectByFatherPathAndName(theStudy, thePath, theName):"<<endl;
- aStr<<aPrefix<<"father = theStudy.FindObjectByPath(thePath)"<<endl;
- aStr<<aPrefix<<"itr = theStudy.NewChildIterator(father)"<<endl;
- aStr<<aPrefix<<"while itr.More():"<<endl;
- aStr<<aPrefix<<aPrefix<<"so = itr.Value()"<<endl;
- aStr<<aPrefix<<aPrefix<<"if so.GetName()==theName: return so"<<endl;
- aStr<<aPrefix<<aPrefix<<"itr.Next()"<<endl;
- aStr<<aPrefix<<aPrefix<<"pass"<<endl;
- aStr<<aPrefix<<"return None"<<endl;
-
- aStr<<endl;
- }
-
// theIsValidScript currently is not used by internal dump methods (DumpChildrenToPython(), etc.)
// If the situation changes, then the following line should be removed, and theIsValidScript
// should be set properly by those internal methods