[Paraview] Animation script needed

J García de la Hoz painted_green_x at hotmail.com
Tue Aug 12 07:36:01 EDT 2008


Hi, now I know how to animate a scene with python in paraview. It is supposed that it goes like this:
 
# Create an animation scene.scene = animation.AnimationScene();# Add one view.scene.ViewModules = [view];# Update the reader to get the time informationreader.UpdatePipelineInformation()scene.TimeSteps = reader.TimestepValues.GetData()# Animate from 1st time step to lastscene.StartTime = reader.TimestepValues.GetData()[0]scene.EndTime = reader.TimestepValues.GetData()[-1];# Each frame will correspond to a time stepscene.PlayMode = 2; #Snap To Timesteps# Create a special animation cue for time.cue = animation.TimeAnimationCue();cue.AnimatedProxy = view;cue.AnimatedPropertyName = "ViewTime";scene.Cues = [cue];if filename:    writer = vtkSMAnimationSceneImageWriter();    writer.SetFileName(filename);    writer.SetFrameRate(1);    writer.SetAnimationScene(scene.SMProxy);    # Now save the animation.    if not writer.Save():        raise exceptions.RuntimeError, "Saving of animation failed!"
else:    scene.Play()
 
but i've got errors and the output says "name 'animation' is not defined" 
 
1. can you please show me an script example of animation?
 
 
 
_________________________________________________________________
¡El Mundo Messenger te espera! Entra ya en "I love Messenger" y descubre las últimas novedades, trucos, emoticonos…
http://www.vivelive.com/ilovemessenger/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080812/63862a0d/attachment.htm>


More information about the ParaView mailing list