Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linking a keyframe to a specific slider control value

  • Linking a keyframe to a specific slider control value

    Posted by Tobias Ochott on June 7, 2017 at 4:45 pm

    Hello again:
    so here is what i got
    i got an ellipse shape with trim paths which contains two keyframes
    the first one has the the value 0 the second one should be the value a slider control has at this time and keep it for the rest of the comp

    i tried this expression:

    if (numKeys > 1){
    t1 = key(1).time;
    t2 = key(2).time;
    v1 = 0;
    v2 = effect("Slider Control")("Slider");
    linear(time,t1,t2,v1,v2);
    }else
    value

    but it doesnt work because the slider control itself has no changing value

    Dan Ebberts replied 9 years, 2 months ago 3 Members · 4 Replies
  • 4 Replies
  • Scott Mcgee

    June 7, 2017 at 7:35 pm

    Hey Tobias,

    Not sure what you are trying to do.

    The expression is fine, if you are wanting to change the input of Keyframe 2 with a value defined by your slider.

    but it doesnt work because the slider control itself has no changing value

    How do you want the value to change? Based off what you described firstly, your expression is fine.

  • Dan Ebberts

    June 7, 2017 at 7:38 pm

    >the second one should be the value a slider control has at this time

    At which time? Your expression works the way I would expect it to–the value ramps from zero to whatever the slider is set to over the period defined by the two keyframes on the property with the expression.

    Dan

  • Tobias Ochott

    June 7, 2017 at 8:14 pm

    First of all thanks for the fast answer
    So i want the following
    I have a slider control that changes its value over time
    now i want another layer, lets say an ellipse with trim paths, to adapt the values of the slider control up to a certain point in time and hold the last value it got
    the problem with my expression here is that the slider control itself doesn’t change its values

  • Dan Ebberts

    June 7, 2017 at 8:21 pm

    >I have a slider control that changes its value over time

    >the slider control itself doesn’t change its values

    I’m lost.

    Dan

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