You need to set the animated proxy on the cue. Not sure how this could have worked in 3.4 either.
<snip> cue = servermanager.animation.KeyFrameAnimationCue() cue.StartTime = 0.0 cue.EndTime = 1.0 cue.AnimatedProxy = view movie.Cues.append(cue) </snip> Utkarsh On Sat, Jun 13, 2009 at 4:22 AM, Wim van der Meer <[email protected]>wrote: > Hi, > > Running the animation script below from the built-in python > interpreter with ParaView 3.6 (using the latest CVS updates today) > results in a segmentation fault. > > I'd like to get camera animation to work, but I am not sure if I > should do anything different compared to 3.4. Any help would be > appreciated. > > Here is the script: > > > #!/usr/bin/python > # -*- coding: utf-8 -*- > > fps = 24.0 # frames/seconds > > view = GetActiveView() > camera = GetActiveCamera() > > movie = servermanager.animation.AnimationScene() > movie.ViewModules = [view] > movie.NumberOfFrames = int(round(fps * 3.0, 0)) > > cam_vu = camera.GetViewUp() > cam_pos = camera.GetPosition() > > cue = servermanager.animation.KeyFrameAnimationCue() > cue.StartTime = 0.0 > cue.EndTime = 1.0 > movie.Cues.append(cue) > > keyf0 = servermanager.animation.CameraKeyFrame() > keyf0.KeyTime = 0.0 > keyf0.Position = camera.GetPosition() > keyf0.FocalPoint = camera.GetFocalPoint() > keyf0.ViewUp = camera.GetViewUp() > keyf0.ViewAngle = camera.GetViewAngle() > > camera.SetRoll(60.0) > camera.Elevation(-50.0) > > keyf1 = servermanager.animation.CameraKeyFrame() > keyf1.KeyTime = 1.0 > keyf1.Position = camera.GetPosition() > keyf1.FocalPoint = camera.GetFocalPoint() > keyf1.ViewUp = camera.GetViewUp() > keyf1.ViewAngle = camera.GetViewAngle() > > cue.KeyFrames = [keyf0, keyf1] > > camera.SetViewUp(cam_vu) > camera.SetPosition(cam_pos) > > #movie.Play() # Play the animation > movieWriter = servermanager.vtkSMAnimationSceneImageWriter() > movieWriter.SetFrameRate(fps) > movieWriter.SetFileName("movie.png") > movieWriter.SetAnimationScene(movie.SMProxy) > movieWriter.Save() > _______________________________________________ > 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://www.paraview.org/mailman/listinfo/paraview >
_______________________________________________ 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://www.paraview.org/mailman/listinfo/paraview
