scene.wait_upto
Description of proposed feature
This feature will allow you to wait until the scene has run for a specific duration.
Lots of people overlay audio onto their videos and this will make it easier to sync audio and animation.
How can the new feature be used?
# play animations
self.wait_upto(60)
# scene has run for 1 minute
# play more animations
self.wait_upto(90)
# another 30 seconds have passed
Additional comments
I've been using it in my own projects and would be happy to implement it and submit a PR when if that's fine. I just want to get a go-ahead and any comments about things I might not have thought of.
I find this an interesting idea but where is the benefit over just using your editing software to extend the animations?
And there is also a wait until function. That might be able to do something similar if I'm not completely mistaken.
I find this an interesting idea but where is the benefit over just using your editing software to extend the animations?
And there is also a wait until function. That might be able to do something similar if I'm not completely mistaken.
One of the benefits of this is that you can compile with ffmpeg for example, rather than using additional software that you have to pay for or has a watermark, etc. It also means you don't have to keep track of the runtimes of each individual animation as it runs.
The wait_until function is just a wrapper for the wait function and would not offer the same functionality:
stop_condition
A function without positional arguments that evaluates to a boolean.
The function is evaluated after every new frame has been rendered.
Playing the animation only stops after the return value is truthy.