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

**URL:** https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144
**Category:** ParaView Support
**Created:** [January 10, 2023, 1:41am UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144 "2023-01-10T01:41:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MontelukastNa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/montelukastna/32/10664_2.png) [@MontelukastNa](https://discourse.paraview.org/u/MontelukastNa)
#### Post date: [January 10, 2023, 1:41am UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144/1 "2023-01-10T01:41:25Z")

</div>

Dear all:

> 🏁 **Could u tell me how to fix the object in the center of the window all the time in paraview?**

> 🚩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.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/2/2dec71fb7666032a27a41543b8fd82a29256f026.png)  
After a certain time step the bubble will run out of the paraview‘s window  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/64dbf0f0aef9786b18b1495372d544a61559917b.png)

Best regards  
Na!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 10, 2023, 7:37am UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144/2 "2023-01-10T07:37:47Z")

</div>

Hi @MontelukastNa

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

Let me know if you need help with that.

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [January 10, 2023, 1:55pm UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144/3 "2023-01-10T13:55:39Z")

</div>

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](https://discourse.paraview.org/uploads/default/original/2X/3/3ad665c1fa7d021f2c92c39157f42c99aba97b87.png)

---

<div class="post-metadata">

### Author: ![MontelukastNa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/montelukastna/32/10664_2.png) [@MontelukastNa](https://discourse.paraview.org/u/MontelukastNa)
#### Post date: [January 11, 2023, 1:40am UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144/4 "2023-01-11T01:40:45Z")

</div>

Hi @[Mathieu Westphal](https://discourse.paraview.org/u/mwestphal)  
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)](https://discourse.paraview.org/u/Dave_DeMarle)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!

---

<div class="post-metadata">

### Author: ![MontelukastNa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/montelukastna/32/10664_2.png) [@MontelukastNa](https://discourse.paraview.org/u/MontelukastNa)
#### Post date: [January 11, 2023, 1:43am UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144/5 "2023-01-11T01:43:56Z")

</div>

Amazing, It worked very well, thank you @ [Dave DeMarle (Intel)](https://discourse.paraview.org/u/Dave_DeMarle)  
thank you very much for your kind reply again.

Best regards  
Na!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 11, 2023, 7:36am UTC](https://discourse.paraview.org/t/how-to-automatically-keep-objects-in-the-windows-center-at-every-timestep-in-paraview/11144/6 "2023-01-11T07:36:25Z")

</div>

Right, I forgot about this mode. Thanks @Dave_DeMarle 🙂
