Hi Blaise, Here is some example code that should help:
#ensure you have cue and the keyframes already setup movie = servermanager.animation.AnimationScene() movie.ViewModules = [GetActiveView()] movie.NumberOfFrames = 10 movie.Cues = [cue] movie_writer = servermanager.vtkSMAnimationSceneImageWriter() movie_writer.SetFileName("slice_movie.avi") movie_writer.SetFrameRate(2) movie_writer.SetQuality(2) #movie_writer.SetMagnification(2) movie_writer.SetAnimationScene(movie.SMProxy) movie_writer.Save() If you want more information on each of these, open up the Python Shell and take a look at the available functions. Cheers, Adriano =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agaglia...@ara.co.uk Url: www.ara.co.uk -----Original Message----- From: paraview-boun...@paraview.org [mailto:paraview-boun...@paraview.org] On Behalf Of Blaise Bourdin Sent: 16 June 2011 16:53 To: paraview@paraview.org Subject: [Paraview] saving animations from python Hi, I am trying to script still frames and movie animations (time evolution) in python. The goal is to do batch processing of a large number of simulations. Parsing through the online documentation and wiki, I was able to do basic movie files using the AnimateReader function, but I can't figure out how to control the properties of the movie (number of frames, number of frames per second etc). Trace does not return anything useful when using File -> Save Animation. in the GUI. - Is it possible to set the options from the File -> Save Animation menu programmatically in python? I also looked into using keyframes for the time evolution, following the 3rd example at file:///opt/HPC/ParaView-3.10.1/Documentation/Book/Book_Chapter14.html#Anima ting but still have issues: - How do I set the cue in a keyframe to be the analysis time / time step number? - Is it possible to programmatically save an animation to an avi file in python? Regards, Blaise -- Department of Mathematics and Center for Computation & Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin _______________________________________________ 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 ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** _______________________________________________ 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