Tweening with Tweener! A python based solution
I have created a tutorial to help get started with my Tweener extension.
Tweener Intro for TouchDesigner
Love love love where youâre going with this. Great syntax and feature set. This community really benefits from animation support such as yours, thanks for sharing!
this is pretty sweet, well done @amazingrobot
I am glad you are finding it useful. I am still wrapping my head around Python OOP to see how I can improve it. I want to add a Timeline Class that you can then add Tweens to build sequences that you can play, pause, repeat, and reverse.
wow! This is so great to see! Thanks for your great work and sharing!
Trying it out and it is really good!.. Thank you, @amazingrobot
This said, Iâve run into a bit of a notation problem while trying to automate DAT Table contents. How do I specify a particular table cell as a target? The Tweenerâs syntax requires a parameter name; however, table cells got no names and are referenced by indexing. Whatâs the solution here?
Correct, it is only setup to target Pars of OPs. A solution for your situation might be to update a constant chop and then have a ChopExecute onValueChange update the Dat cell. I will think on this and see if there would be a clean way to support [row,col] as a targetable property.
I see. Thanks for an explanation. Having Tweener capable of addressing table cells would be invaluable! Thanks for considering this.
this errors if the calling scripts is a root level (and not inside a COMP)
Thanks for the bug report. I am working on an update and will try to get it out this week. I am looking into doing a hybrid approach mixing python and chops to see if I can improve performance. I also plan to add tween pooling with this new hybrid setup to reuse expired tween blocks instead of deleting and rebuilding each time.
Hello, Thank you for sharing the great tox.
But version 1.2 seems not to be working properly.
The inspect.stack()
have to be directly called in FromTo or To function. Currently, it is called in _path_trace
function thus the path retrieved in it is going to be Tweener comp. As a result, the path for the operator is not correct.
wondering how one might use tweener animations with a lookup, so that a modulation normalized float scrubs through the stack. Could see this as a really powerful way to livecode and improvize with animations
This is great, thank you so much.
Can you please implement a âgroupâ property to the tweens so that we can kill them superfast via group id? Like in the same way run() works? This would change everything in terms of performance and overhead.
You could create an array to push the tween IDs into then create a function to loop and kill by ID.
My next goal is to create a new class called Timeline. Then you can create a âgroupâ of tweens that can be controlled outside the main frameloop. For example create an new Timeline called âIntroâ then you could append each new tween into that timeline. Now you could independently control that timeline. Example: Intro.Play(), Intro.Stop(), Intro.Seek(1.5), etc
I did! It all works great- thanks. I also added an âonStepâ callback, enabling Your op to drive other params⌠think animated cameras
onComplete call doesnât work well.
def test(a):
print(a)
return
op.Tweener.To(ârectangle2â,{âcenterxâ:0.5,âdurationâ:2,âonCompleteâ:âtest(1)â}) this will get result: âtestâ not defined. only âprint(134)â can be ok. can you explain why and how ?
You will need to use an absolute path to the function. I like to use globals in my projects to simplify it.
op(â/project1/somecontainerWithExtâ).Test(1)
op.App.Test(1)