[Paraview] Animating camera in batch mode

Favre Jean jfavre at cscs.ch
Fri Sep 3 08:34:37 EDT 2010


________________________________________


I would like to be able to orientate the camera whilst running batch scripts
for generating animations, as you can do in interactive mode. However, I'm
stuck on what to use for the AnimatedProxy. I tried the following and I get
an error message:

#move camera
keyc1 = servermanager.animation.CompositeKeyFrame()
keyc1.Interpolation = "Ramp"
keyc1.KeyTime = 0
keyc1.KeyValues = [0,0,0]
keyc2 = servermanager.animation.CompositeKeyFrame()
keyc2.KeyTime = 1.0
keyc2.KeyValues = [0.1,0,0]

cue2 = servermanager.animation.KeyFrameAnimationCue()
cue2.AnimatedProxy = GetRenderView()
cue2.AnimatedPropertyName = "CameraPosition"
cue2.KeyFrames = [keyc1,keyc2]

ERROR: In
/usr/people/gagliard/Paraview/FILES/ParaView3-Original/Servers/ServerManager
/vtkSMRampKeyFrameProxy.cxx, line 53
vtkSMRampKeyFrameProxy (0x2aac712b3770): Cue does not have domain or
property set!
________________________________________

May I suggest to use the following:

cue2 = servermanager.animation.CameraAnimationCue()
keyc1 = servermanager.animation.CameraKeyFrame()
keyc2 = servermanager.animation.CameraKeyFrame()

keyc1.ListProperties() will give you all the properties you can animate;

['ClosedFocalPath', 'ClosedPositionPath', 'FocalPathPoints', 'FocalPoint', 'FocalPointMode', 'KeyTime', 'KeyValues', 'ParallelScale', 'Position', 'PositionMode', 'PositionPathPoints', 'ViewAngle', 'ViewUp']

The rest is up to you.
-----------------
Jean M. Favre
Swiss National Supercomputing Center


More information about the ParaView mailing list