How to automatically keep objects in the window's center at every timestep in paraview

Dear all:

:checkered_flag:Could u tell me how to fix the object in the center of the window all the time in paraview?

:triangular_flag_on_post:In simple terms, it’s like doing a “Zoom to data” at every time step

Because after some timesteps, the bubble always runs out of the paraview window, I have been searching for a long time but I can’t find out how to do it, currently I am manually clicking on each frame individually.

The details are as follows: this is what the bubble looks like when it remains in the center at the initial moment.


After a certain time step the bubble will run out of the paraview‘s window

Best regards
Na!

Hi @MontelukastNa

A simple python script that calls ResetCamera() on each frame would do it.

Let me know if you need help with that.

There is also the “Follow Data” Camera type in the Animation View in case you are using Animation cues to set up your export.
image

1 Like

Hi @Mathieu Westphal
Thanks for your kind reply,
I’m new to python,but I can roughly understand that the concept you are talking about is to automate time-step playback and camera reset operations through scripts.
@ Dave DeMarle (Intel)provides a way to achieve the goal after adding the “Animation View”, so I am going to use the approach he mentioned, thank you very much for your kind reply.

Best regards
Na!

Amazing, It worked very well, thank you @ Dave DeMarle (Intel)
thank you very much for your kind reply again.

Best regards
Na!

Right, I forgot about this mode. Thanks @Dave_DeMarle :slight_smile: