# How to render a sequence in python

**URL:** <https://forums.developer.nvidia.com/t/how-to-render-a-sequence-in-python/250392>\
**Category:** Synthetic Data Generation (SDG)\
**Tags:** python\
**Created:** [April 18, 2023, 7:23pm UTC](https://forums.developer.nvidia.com/t/how-to-render-a-sequence-in-python/250392 "2023-04-18T19:23:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkhaleghi](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lkhaleghi](https://forums.developer.nvidia.com/u/lkhaleghi)\
**Post date:** [April 18, 2023, 7:23pm UTC](https://forums.developer.nvidia.com/t/how-to-render-a-sequence-in-python/250392/1 "2023-04-18T19:23:16Z")

</div>

Hi,  
I am new to omniverse code, I want to render a sequence through Python code, however, I have no clue how I can write the code and update the scene. I can only do it by Movie Capture which is not what I want. The main thing that I am looking for is just simple code that loops through all the animation frames.  
Thanks

---

<div class="post-metadata">

**Author:** ![dennis.lynch](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dennis.lynch/32/175642_2.png) [@dennis.lynch](https://forums.developer.nvidia.com/u/dennis.lynch)\
**Post date:** [April 21, 2023, 9:29pm UTC](https://forums.developer.nvidia.com/t/how-to-render-a-sequence-in-python/250392/2 "2023-04-21T21:29:40Z")

</div>

Hello,

I am unclear what you mean by:

> I want to render a sequence through Python code, however, I have no clue how I can write the code and update the scene

You can try looking through the tutorials and documentation for Replicator to see if it fits your needs outside of `Movie Capture`

[Writer Examples — Omniverse Extensions documentation (nvidia.com)](https://docs.omniverse.nvidia.com/prod_extensions/prod_extensions/ext_replicator/writer_examples.html)

---

<div class="post-metadata">

**Author:** ![lkhaleghi](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lkhaleghi](https://forums.developer.nvidia.com/u/lkhaleghi)\
**Post date:** [April 26, 2023, 2:52pm UTC](https://forums.developer.nvidia.com/t/how-to-render-a-sequence-in-python/250392/3 "2023-04-26T14:52:21Z")

</div>

for i in range (num\_frames):  
omni.timeline.get\_timeline\_interface().forward\_one\_frame()  
“” some code for changing the camera and rendering""

but this does not work, it just rendered the last frame

---

<div class="post-metadata">

**Author:** ![dennis.lynch](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dennis.lynch/32/175642_2.png) [@dennis.lynch](https://forums.developer.nvidia.com/u/dennis.lynch)\
**Post date:** [April 28, 2023, 4:46pm UTC](https://forums.developer.nvidia.com/t/how-to-render-a-sequence-in-python/250392/4 "2023-04-28T16:46:23Z")

</div>

Have you looked at our [Replicator tutorials](https://docs.omniverse.nvidia.com/prod_extensions/prod_extensions/ext_replicator/camera_examples.html) for modifying the camera?

Those should guide you through setting-up distributions or [custom randomizers](https://docs.omniverse.nvidia.com/prod_extensions/prod_extensions/ext_replicator/randomizer_details.html) for modifying the camera each frame.

There is also `rep.orchestrator.step()` if you wish to manually control advancing the timeline
