Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Recording scene programs as an animated gif image
-
Here is the code to record scene programs as an animated gif image.
https://github.com/balachandrana/animating_gif_in_pythonista_scene/blob/master/record_pythonista__scene_as_gif.pyThe program calls "draw_snapshot" method of SceneView to take snapshots of the node at each update call and coverts them to a gif file using images2gif module. Creating gif file is performed in a background thread and hence it does not affect the performance. The "draw_snapshot" method is very costly and it slows down the frame rate considerably. It may not be ok for recording games but for creating animated scenes particularly with shader could be useful. May be there is a faster way to capture data using objc_util. (Note that codea has a facility to record games.)
There has been discussion before on this.
- https://forum.omz-software.com/topic/2185/image-from-scene
- https://forum.omz-software.com/topic/1523/controlling-screenshots
The code works only with 2.7. images2gif module gives problem with 3.5.
I hope this is useful.