From: apo Date: Wed, 1 Nov 2006 11:49:42 +0000 (+0000) Subject: To use TimeStampsRange as universal way to iterate through availble timestamps X-Git-Tag: WP1_2_3_06-10-2006~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29e5cc9229f7b155fd356d8ac3a2a9a135d690f3;p=modules%2Fvisu.git To use TimeStampsRange as universal way to iterate through availble timestamps --- diff --git a/src/VISU_SWIG/visu_change_input.py b/src/VISU_SWIG/visu_change_input.py index fed21181..c55ee548 100644 --- a/src/VISU_SWIG/visu_change_input.py +++ b/src/VISU_SWIG/visu_change_input.py @@ -34,8 +34,8 @@ def WalkTroughTimeStamps(theVISUType, theResult, theMeshName,theEntity, theFieldName, theTimeStampNumber, theViewManager): anOldFactoryMethod = GetPrsType2OldFactoryMethod(theVISUType) - aPrs3d = anOldFactoryMethod(theResult, theMeshName, theEntity, theFieldName, theTimeStampNumber) + aPrs3d = myVisu.CreatePrs3d(theVISUType, myVisu.GetCurrentStudy()) aPrs3d.SetResultObject(theResult) aPrs3d.SetMeshName(theMeshName) @@ -50,20 +50,16 @@ def WalkTroughTimeStamps(theVISUType, print "\ttheTimeStampNumber = %s" % theTimeStampNumber return - aRange = aPrs3d.GetTimeStampsRange() - for anInfo in aRange: - print "%d (%s); " % (anInfo.myNumber, anInfo.myTime), - pass - print - aView = theViewManager.Create3DView(); aView.SetTitle("To test presentation of %s type" % theVISUType) aView.Display(aPrs3d); aView.FitAll() aDelay = 0.0 - for aTimeStampNumber in xrange(1,7): - aPrs3d.SetTimeStampNumber(aTimeStampNumber) + aRange = aPrs3d.GetTimeStampsRange() + for anInfo in aRange: + print "%d (%s); " % (anInfo.myNumber, anInfo.myTime) + aPrs3d.SetTimeStampNumber(anInfo.myNumber) aPrs3d.Apply() aView.Update(); time.sleep(aDelay) @@ -98,6 +94,8 @@ aTimeStampNumber = 1 aViewManager = myVisu.GetViewManager(); +WalkTroughTimeStamps(VISU.TSCALARMAPONDEFORMEDSHAPE, aResult, aMeshName, anEntity, aFieldName, aTimeStampNumber, aViewManager) + for aVISUType in PRS3D_TYPE_LIST: WalkTroughTimeStamps(aVISUType, aResult, aMeshName, anEntity, aFieldName, aTimeStampNumber, aViewManager) pass