Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › After Effects Looping Expressions With Sliders?

  • After Effects Looping Expressions With Sliders?

    Posted by Dev Marks on August 10, 2021 at 2:40 pm

    I’m looking to time remap a lot of clips so that they loop using loopOut(). But each clip is different, so may require different loop lengths and start positions.

    Does there exist a script or expression that I could add to my time remap and hook to a couple of sliders to control the start position of a loop and the length of a loop for any clip?

     

    Thanks very much (I’ve been googling this hard and haven’t been able to find a ton of applicable info)

     

    Dev Marks replied 5 years, 1 month ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    August 10, 2021 at 6:39 pm

    Something like this should work (where the slider times are in seconds):

    tStart = effect("Start")("Slider");

    dur = effect("Duration")("Slider");

    tStart + time%dur

  • Dan Ebberts

    August 10, 2021 at 7:17 pm

    Actually this might be better, in case you move the layer in the timeline:

    tStart = effect("Start")("Slider");

    dur = effect("Duration")("Slider");

    tStart + (time - inPoint)%dur

  • Dev Marks

    August 11, 2021 at 6:54 pm

    Dan, thank you very much for this…I don’t have a good understanding of AE coding so could use advice if possible….

    I’m attempting to implement but probably am not understanding it very well. Would I be adding sliders and naming them ‘start’ and ‘duration’, but also would this all be in my TimeRemap script? (image below to illustrate)

  • Dan Ebberts

    August 11, 2021 at 7:43 pm

    Yes, but get rid of the loopOut() part.

  • Dev Marks

    August 11, 2021 at 7:46 pm

    Thank you, of course that did it. Really appreciate your time on this…d

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy