tooll3 / t3

Tooll 3 is an open source software to create realtime motion graphics.
MIT License
3.41k stars 189 forks source link

Adds PlayAtlas and SnapToMultiple operators #428

Closed anosci closed 4 months ago

anosci commented 4 months ago

An operator for turning Atlases into animations, for use with GIFs, sprite sheets, etc. For a better user experience, I've also included SnapToMultiple, which will return the lowest divisor of a number that has a modulus of 0. playatlas

ylmrx commented 4 months ago

Thanks for this PR ! Thus it's working fine, there's a few cosmetic and optimization issues you can fix 👍

ylmrx commented 4 months ago

Regarding the PlayAtlas operator itself, there's a bunch of unbound operator you can dispose, and the ClampInt ops bound to FrameCount[X/Y] can be removed and replaced with the correct parameter settings (cf. screenshot, set "Min" to 1 in your case). image

anosci commented 4 months ago

I went ahead and made all of the changes you mentioned, except for the loop optimization. I think what you proposed would always return the lowest possible modulo, whereas I'm looking for the next lowest modulo (at, or below, the given input for Mod).

Also, my "IDE" is notepad++, so it might not actually take care of the indentation for me. I'm not sure. 😅 I tried to make it consistent, at least.

pixtur commented 4 months ago

Thanks for this awesome contribution! And thanks to @ylmrx for going ahead and reviewing. This really helps a lot!