Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/visu.git] / src / VISU_SWIG / visu.py
index daadf7aa4f935a60d91c2587847a18132f5e3518..ea05e2bf4578b6c7a86d4c306a3f41fe5e57c0c8 100644 (file)
@@ -81,6 +81,12 @@ def PublishComponent(theStudyDocument):
         pass
     
     return aSComponent;
+
+def SetName(theObj, theName):
+    anIOR  = myORB.object_to_string(theObj)
+    aSObj  = myLocalStudy.FindObjectIOR(anIOR)
+    anAttr = aSObj.FindAttribute("AttributeName")[1]
+    anAttr.SetValue(theName)
         
 def StrToMap(theString) :
     aPairList = split(theString,";")
@@ -602,6 +608,23 @@ def CreatePrsForResult(theVisu, theResult, theView, thePrsTypeList, thePictureDi
                                             aPrsObj.RemoveFromStudy()
                                         else :
                                             aVISUObjList.append(aPrsObj)
+
+                                if HasValue(thePrsTypeList,VISU.TSCALARMAPONDEFORMEDSHAPE) :
+                                    print "          Creating ScalarMapOnDeformedShapeOnField",
+                                    aPrsObj = theVisu.ScalarMapOnDeformedShapeOnField(theResult,aMeshName,anEntity,aFieldName,aTimeStampId)
+                                    if aPrsObj is None : print "Error"
+                                    else :
+                                        print ",OK"
+                                        theView.DisplayOnly(aPrsObj)
+                                        theView.FitAll()
+                                        aPictureName = thePictureDir + aMeshNamePic + "_" + anEntityId + "_" + aFieldName + "_" + str(aTimeStampId) + "_TSCALARMAPONDEFORMEDSHAPE." + thePictureExt
+                                        aPictureName = re.sub("\s+","_", aPictureName)
+                                        theView.SavePicture(aPictureName)
+                                        if theIsAutoDelete :
+                                            aPrsObj.RemoveFromStudy()
+                                        else :
+                                            aVISUObjList.append(aPrsObj)
+                                
     return aVISUObjList