Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions if/then and index to create opposing rotation per layer

  • if/then and index to create opposing rotation per layer

    Posted by Brandon Mcfarland on January 24, 2011 at 10:30 pm

    I’m trying to have every other layer start it’s rotation at 90 and -90 and then ease into it’s initial value. The way I have it written now seems to disregard index values and just bases it off of what I enter into the line
    “n=index-90”

    Thanks,
    Brandon

    start =
    n=index-90;
    i=(index%2)-n;
    if (i=1){ n=90 }else{ n=-90};
    end = value;

    ease(time, 0, 2 + (index*thisComp.frameDuration), start, end)

    Brandon Mcfarland replied 15 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 24, 2011 at 11:31 pm

    Try this (you might have to switch the -1 and 1):

    startVal = 90*(index%2 ? -1 : 1);
    ease(time,0,2 + index*thisComp.frameDuration,startVal,value)

    Dan

  • Brandon Mcfarland

    January 24, 2011 at 11:47 pm

    Awesome! That works perfectly.

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