Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Using expression to reverse animation done by expressions?

  • Using expression to reverse animation done by expressions?

    Posted by Eunice Wong on February 10, 2021 at 3:35 pm

    Hi, I will try my best to explain what I would like to do.

    Basically, I am trying to create a mogrt for a lower third, and I want the Premiere Pro user to easily be able to change the transition duration, as well as the whole duration of the lower third, by typing in the respective durations. I have managed to use expressions with some sliders to animate it in:

    content(“Rectangle 1”).content(“Rectangle Path 1”).size

    t1 = inPoint;

    t2 = t1+effect(“Transition”)(“Slider”);

    t3 = effect(“Duration”)(“Slider”)-t2;

    t4 = effect(“Duration”)(“Slider”);

    v1 = [0,effect(“Width”)(“Slider”)];

    v2 = [effect(“Height”)(“Slider”),effect(“Width”)(“Slider”)];

    ease(time,t1,t2,v1,v2);

    and if I change the last line to

    ease(time,t3,t4,v2,v1);

    I can get the out animation that I want (which is basically reversing the in animation). However, I don’t know how to get the whole thing to animate in, and then animate out. I can only have one or the other. I am very new to expressions, so any guidance/other solutions will be much appreciated!

    Dan Ebberts
    replied 5 years, 7 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    February 10, 2021 at 8:23 pm

    Try replacing the last line with this:

    time < t2 ? ease(time,t1,t2,v1,v2) : ease(time,t3,t4,v2,v1);

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