CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] python_script_animation_paraview (https://www.cfd-online.com/Forums/paraview/121115-python_script_animation_paraview.html)

Jeff74A July 22, 2013 04:15

python_script_animation_paraview
 
Hi everyone,

I know that it is possible to make PYTHON scripts for Paraview. I have an animation on Paraview (Ensight GOLD format) and I would like to write a script in PYTHON in order to :

- change the colour of the animation
- get a precise geometric positionning of the animation
- save one of the frames of the animation

May I ask you where I could find some help to do so please ? I have studied a little about programming (mainly C language) but never PYTHON.

Thank you very much for any help you could provide me with !

Jeff74A July 23, 2013 03:47

Hi everyone !

I finally found out the solution to my problem yesterday and I am posting it here in order to help people who would have the same kind of problem.

Basically, you dont need to learn Python to make a script for Paraview. The software we'll do it for you if you just need do make a script for basic things like changing colours, positionning the camera etc...

What you have to do is to use the "Trace" function in Paraview.

This "Trace" will record the different buttons you're pressing in Paraview and will create a Python file according to them. Next time you want to use the same format for your animation just load the newly created Python file.

You can start the "Trace" function par opening : Tools --> Start Trace.

That's all, I hope that it may help some of you.


All times are GMT -4. The time now is 00:39.