How to make a closed loop?

I made an animation from frame 500 to frame 560. It’s a simple 360 rotation. I wanted to loop this animation on my project, I used the Curve Editor / Right click / Predefined / Loop. Which created this formula:

curve(((frame - 500) % (560 - 500 + 1)) + 500, 0).

With this my looped animation goes beyond frame 0 to beyond the frame 3000 [last frame on the project]. But I only need to loop ip from frame 400 until frame 1400.

I tried to use this custom expression:

if(frame > 400 and frame < 1400) {curve(((frame - 500) % (560 - 500 + 1)) + 500, 0)}

and I got back an error I couldn’t understand nor copy.

I’m a rookie on Natron and Python.

Is there an easy way to start-end the loop on specific frames?

I attached a screenshot of the curve editor.

Hello, just plug TIme->FrameRange node to your infinite loop Transform node , set your desired range, after that set Before to Hold, and After to Hold.

1 Like