[Paraview] Attempting to start an animation in the middle

Bill Sherman shermanw at indiana.edu
Mon Jul 14 02:14:14 EDT 2014


Hello PVer's,

I'm trying to start a batch animation in the middle of the animation
track, but I have not yet figured out how to make it work.

I've tried lots of things that looked promising, but none work.

So in my ParaView batch script (which starts out loading a statefile
created by the GUI client), I create a Python animation cue, based
on some code I found a while back, and that has been working fine.
But now I need to be able to start animations in the middle, and
at first I thought it was working, but it was really always starting
from the beginning.

So my script has the lines:
	scene.StartTime = 1200
...
	view.UseOffscreenRendering = 1
	WriteAnimation("file.png")

and my Python cue has this in the "tick()" method:
    i = int(scene.TimeKeeper.Time)
    print "time is " + str(i) + " / " + str(self.GetAnimationTime())
    view.ViewTime = i
    scene.AnimationTime = i

So the value of "i" is correct, it starts at "1200", but when I print
"GetAnimationTime()", it starts at time 0.0 (which is normalized from 0.0
to 1.0).

The "scene.AnimationTime = i" seems to have no effect.


So some documentation for the "WriteAnimation" says that there are a
few parameters, but the two parameters I thought might work, aren't
actually implemented in "simple.py", so I guess that's a bug:
     WriteAnimation("file.png", StartFileCount=1200, 
PlaybackTimeWindow=[1200,1600])

that doesn't work either.


So looking in the "simple.py" code, I repalced the wall to WriteAnimation()
with this:
     iw = servermanager.vtkSMAnimationSceneImageWriter()
     iw.SetAnimationScene(scene.SMProxy)
     iw.SetFileName("file.png")
     iw.SetStartFileCount(1200)
     iw.SetPlaybackTimeWindow(.7, 1.0)
     iw.Save()
     WriteAnimation("file.png")

And that doesn't work either.

I should note that it fails in two ways:

1) It doesn't start the file numbering at 1200

2) It doesn't render the scene at time 1200

I should not though that the "Annotate Time" source actually reports
the time as though it starts at 1200.  But the camera moves and other
aspects of the scene all start at time 0.


Thoughts/suggestions would be greatly appreciated.

	Thanks in advance,
	Bill

--
Bill Sherman
Sr. Technology Advisor
Advanced Visualization Lab
Pervasive Technology Inst
Indiana University
shermanw at indiana.edu




More information about the ParaView mailing list