Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects loop in AND loop out

  • loop in AND loop out

    Posted by Marc De coster on June 22, 2010 at 9:50 am

    Hi! New problem …
    I have a project where some layers rotate around a globe (it’s not for me, it’s for a training session I give!)
    and here is my problem: I wrote an expression to loop my rotation loop_out(“cycle”,0) and, of course, it works. Now, I wanted to have the same rotation withe a loop in. So I added a line to my expression:

    loop_in(“cycle”,0)
    loop_out(“cycle”,0)

    and it doesn’t work. I have a loop in OR a loop out but I can’t have them both on the same layer. May be I should add something between my two expressions?
    Any ideas?

    Thank u guys

    Roei Tzoref replied 5 years, 1 month ago 5 Members · 7 Replies
  • 7 Replies
  • Michael Szalapski

    June 22, 2010 at 1:22 pm

    ;
    You need ; after each line of code.

    – The Great Szalam
    (The ‘Great’ stands for ‘Not So Great, in fact, Extremely Humble’)

    No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.

  • Kevin Camp

    June 22, 2010 at 1:44 pm

    what’s happening is the last statement is the one that ae will execute. so, loop_out is the only one you will see.

    what you’ll need are some conditional statements that will make each statement get executed when certain criteria is met — essentially, when time is less than when the rotation starts, loopIn; when it is after rotation ends, loopOut; if it is in between the keys, return the actual values…

    something like this should work:

    if (time=key(numKeys).time){
    value;
    }else{
    if (timekey(numKeys).time) loopOut();
    }

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Kevin Camp

    June 22, 2010 at 1:59 pm

    oops, part of the expression was removed due to the symbols…

    lets try this again:

    if (time < key(1).time) loopIn();
    if (time >= key(1).time && time <= key(numKeys).time) value;
    if (time > key(numKeys).time) loopOut();

    that looks better, and it’s a little simpler than the original

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Marc De coster

    June 22, 2010 at 2:11 pm

    Yessss it works!

    Thank u. I thought it would have been easier but … expressions are always a pain in the ….

    However, I wouldn’t have find it by myself so … thank u

  • Richard Thompson

    August 21, 2012 at 10:55 pm

    Kevin that expression work is formidable. Really good stuff.

    whilst messing around with the expression to understand how it works I found you can reduce your code slightly into this…

    if (time < key(1).time) loopIn(“continue”);
    else (value);
    if (time > key(numKeys).time) loopOut(“continue”);

  • Roei Tzoref

    November 8, 2018 at 11:00 pm

    also this would work:
    loopIn()+loopOut()-value

    Roei Tzoref
    2D/VFX Generalist & Instructor
    ♫ AeBlues Tutorials ♫
    http://www.tzoref.com

  • Roei Tzoref

    June 15, 2021 at 6:30 am

    more like this:
    loopIn(“continue”)+loopOut(“continue”)-value

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