X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISU_SWIG%2Fvisu.py;h=c287e79aa922c4abff22e41042e8bdd24826b940;hb=3f4152dedc1ae968267cfb8a079f261ec0088ed0;hp=daadf7aa4f935a60d91c2587847a18132f5e3518;hpb=953451df51750a1d9910c0325f01d5ca7b6e0330;p=modules%2Fvisu.git diff --git a/src/VISU_SWIG/visu.py b/src/VISU_SWIG/visu.py index daadf7aa..c287e79a 100644 --- a/src/VISU_SWIG/visu.py +++ b/src/VISU_SWIG/visu.py @@ -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,";") @@ -339,7 +345,9 @@ def CreatePrsForResult(theVisu, theResult, theView, thePrsTypeList, thePictureDi while aFolderIter.More() : aFolderSObj = aFolderIter.Value() aFolderIter.Next() - anAttr = aFolderSObj.FindAttribute("AttributeName")[1] + anIsFound, anAttr = aFolderSObj.FindAttribute("AttributeName") + if not anIsFound : + continue anAttr = anAttr._narrow(SALOMEDS.AttributeName); aFolderName = anAttr.Value() print " ", aFolderName @@ -602,6 +610,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