Looping a section - Retime?


Hi there guys,

I’m in the middle of something and would need to loop a section of my clip constantly. So in Nuke I’d go with the Retime node, set my range and the operator to loop, done.

in Natron, Retime deosn’t do this, so I tried the Timewarp function of it but that literally doesn’t change anything, the node is still passthrough even after I changed the curve.

I the tried FrameRange which lets me set my range, but I can only set it to hold/black/original, not loop.

So what’s the deal how to properly loop? :slight_smile: I could maybe use a Framehold and animate it with a sawtooth expression but that kinda curve behaved whacky before, so I’d rather not :frowning:


Hi CameraRick

One quick and dirty way to do this that comes into my mind is to use the looping function from the read node,
that add an extra read node but that should work, I’ll see if I found something better… Maybe that can lead to a Pyplug if there is no other way…


Hi sozap,

but I can’t utilize the loop from a read for any given input, no? I don’t want to render first, what I’m up to should go inside a PyPlug on its own :slight_smile:
The wave-expressions weren’t really stable for me so I don’t see myself using those for this, but I can’t think of any other way to loop something procedurally if not with a wave expression :frowning:


hello, try this one ! https://github.com/NatronVFX/natron-plugins/tree/master/Time/TimeLoop


You got it! Thank you, works like a charm it seems! :slight_smile:


Ok I ran into some issues.

I just popped it into my tree, but when I now created a Transform I got a weird error that had to do with TimeLoop.
For conveniance, I took the TimeOffset inside the PyPlug outside, and edited the Expression and just exchanged the thisGroup.length.get() and thisGroup.start.get() with the numbers I need there, but I get an Error, Expression is invalid.


Hi ! I’ve noticed it too, but even with the warning message it seemed to work fine and get the correct result out of the expression.

What’s your error with Transform and the TimeLoop ? I try to reproduce but without having trouble…

At worse you can try to use the expression even with the warning message and it should work !

Good luck !


It does seem to work but as it is meant to be part of a Pyplug, you can see how this would be weird to get errors when using it :o also I don’t know if it’s clever to have PyPlugs inside of PyPlugs?

I’m not that good with Expressions so I can’t really get my head around how it works, or why I can’t place in numbers instead of links


yes, if it’s for a Pyplug just use the TimeOffset inside the TimeLoop Pyplug, you can safely replace links by numbers.
You’ll have the error message , but the expression should work fine.

The expression is a bit hackish but that was the best way I found to do that :


range(0,frame,10) : return a list ranging from frame 0 to current frame incremented by 10 frame (ex : 0,10,20,30,40)
.pop(-1) get the last item of the list

it’s a bit tricky but that work

Hope that’s will help you to make thinks a bit clearer…


I get the following error: http://i.imgur.com/3RwF9N4.png

I have rewritten the expression like this:

I’ve highlighted the sections that I replaced. Start is at Frame 1, last one is 250. Within the PyPlug it works, but outside not anymore?


I’ve investigated a bit, when I remove the variable frame from the expression I no longer get the error message.
using the frame variable in other situation doesn’t trigger the error message.
I think there is something buggy somewhere.

I’ve got the same issue than yourself with the node not working outside the pyplug, if you save/reload your project , the expression still use the Pyplug variables ( bug !! )

-try to create a fresh new timeoffset and write the expression inside, that in your case can be simplified to :


-say ok to the error message

And you should finally be good to go !