[Paraview] animate parameter for python programmable filter
Ryan Abernathey
ryan.abernathey at gmail.com
Tue Dec 9 17:53:53 EST 2014
Hi,
I would like to animate a parameter with a python programmable filter using
keyframes. In this simple example, I just want to rescale a scalar variable
by a constant factor (alpha). But I want to animate this factor. Here is my
filter:
from paraview.vtk import dataset_adapter as DA
self.SetParameter('alpha', 0.1)
pdi = self.GetInputDataObject(0,0)
pdo = self.GetOutputDataObject(0)
pdo.CopyAttributes(pdi)
d = alpha * inputs[0].PointData['temperature']
arr = DA.numpyTovtkDataArray(d, 'temperature_scaled')
pdo.GetPointData().AddArray(arr)
This script works, but I can't set alpha using keyframes. It just doesn't
show up in the animation view.
Perhaps I have understood what the whole "SetParameter" framework does.
What is the point of setting these parameters if they can't be modified
from outside the filter?
Thanks in advance for your help.
-Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20141209/303f51c3/attachment.html>
More information about the ParaView
mailing list