[Paraview] Animating pvd files using python script
Alexis Chan
alexisc at cs.unc.edu
Sun Mar 20 03:30:18 EDT 2011
Hi
I created pvd files from vtm file series to enable animation in ParaView via
Python script. I want to modify the display properties of the dataset before
animating them. But i got a runtime exception in the "AnimateReader" step.
That's understandable since "dp" is not a reader. How can I animate the
modified data?
from paraview.simple import *
from paraview import servermanager
reader = PVDReader(FileName="TestCase.pvd")
dp = GetDisplayProperties(reader)
dp.Representation='Surface'
for a in reader.PointData:
if (a.GetName() == 'Velocity'):
range = a.GetRange()
dp.LookupTable = GetLookupTableForArray(a.GetName(), 1,RGBPoints =
[range[0], 0, 0, 1, range[1], 1, 0, 0],ColorSpace = "Diverging")
dp.ColorArrayName = a.GetName()
Render()
AnimateReader(dp,filename="TestCase.avi")
--
Regards,
Alexis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110320/7214fde7/attachment.htm>
More information about the ParaView
mailing list