[Paraview] using with python - VTK multifiles animate

BOUSSOIR Jonathan 167706 Jonathan.BOUSSOIR at cea.fr
Thu Jul 2 06:01:00 EDT 2009


Hi all,

I am work with Paraview (3.7) and with linux.
I had done on Paraview to load VTK multifigure and clic a play button to see animation.
I would like to do a same on Pythyn with paraview and I don't know how to do the animation.


from paraview.simple import *
Connect('localhost')

f = ["coupe01.vtk", "coupe02.vtk", "coupe03.vtk", "coupe04.vtk"]
readers = []
for f in files:
    reader = servermanager.sources.LegacyVTKReader(FileNames=f)
    readers.append(reader)

Show(readers[0])
Render()
 
# Create an animation scene
scene = servermanager.animation.AnimationScene()
# Add one view
scene.ViewModules = [GetActiveView()]

# Create a cue to animate the StartTheta property
cue = servermanager.animation.KeyFrameAnimationCue()
cue.AnimatedProxy = GetActiveSource()

# Add it to the scene's cues
scene.Cues = [cue]
....

After, I don't know how I would done ?
Do you have a small pyphon script to explain or if somebody can explained me how I can do.

Thanks in advance for your kind help.

Regards, 
Jona




More information about the ParaView mailing list