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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to