Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Different expression control for different keyframe on same layer

  • Different expression control for different keyframe on same layer

    Posted by Dada Kräuter on July 4, 2016 at 8:01 am

    Hello, 🙂

    I have a solid that changes the color, on frame 5 it’s green on frame 10 it’s red. I want to make two color control, first for 5th keyframe and second for 10th keyframe. One more time, keyframes are on the same solid.

    How can I do that? 🙂

    Thanks!

    Warm regards,
    DADA

    Dan Ebberts replied 9 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 4, 2016 at 5:58 pm

    You haven’t provided a lot of info, but it could be as simple as this:

    c1 = effect(“Color Control”)(“Color”);
    c2 = effect(“Color Control 2”)(“Color”);
    linear(time,key(1).time,key(2).time,c1,c2)

    Dan

  • Dada Kräuter

    July 4, 2016 at 9:17 pm

    Thanks a lot!

    That’s exactly what I needed! 🙂

    DADA

  • Dada Kräuter

    July 4, 2016 at 9:24 pm

    P.S. Is there any way to make 3 keyframes like that?

    c1 = thisComp.layer("CONTROL CENTER").effect("Slider Control")("Slider");
    c2 = thisComp.layer("CONTROL CENTER").effect("Slider Control 2")("Slider")
    c3 = thisComp.layer("CONTROL CENTER").effect("Slider Control 3")("Slider")
    linear(time,key(1).time,key(2).time,key(3).time,c1,c2,c3)

  • Dan Ebberts

    July 4, 2016 at 9:50 pm

    That would be like this:


    c1 = effect("Color Control")("Color");
    c2 = effect("Color Control 2")("Color");
    c3 = effect("Color Control 3")("Color");
    if (time < key(2).time)
    linear(time,key(1).time,key(2).time,c1,c2)
    else
    linear(time,key(2).time,key(3).time,c2,c3)

    Dan

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