Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to Link Value of a Keyframe to a Slider Control without affecting values of other keyframes

  • How to Link Value of a Keyframe to a Slider Control without affecting values of other keyframes

    Posted by Shane Goudy on May 24, 2018 at 8:32 pm

    I’m designing a lowerthird for one of our brands.

    I have 3 keyframes in the X position of an object.

    I need to link the 3rd keyframe to a Slider Control so the final position of the object can be adjusted without affecting the other keyframes.

    Eventually this will be a essential graphics element for premiere and I’d like my team to be able to make this adjustment to the object.

    Everything I’ve tried has caused the values of all the keyframes to change with it.

    I’m thinking the expression will look something like this:

    if ( key(index) = 3 ) {
    key(index).value = effect(“Slider Control”)(“Slider”);
    }else
    key(index).value = value

    I know the syntax isn’t quite right but hopefully it gives a decent idea of what I’m looking for.

    Any advice is much appreciated. Thanks!

    Frederic Antoinette replied 8 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Steve Bentley

    May 25, 2018 at 5:18 pm

    Can you not put the keyframes on the slider instead and link the slider to an unkeyframed property value? Then you just whip down to the 3rd keyframe and move your slider.
    You could also do this WITH keyframes on the property (so, 3 on the property and 3 on the slider)as well and use a check box with an expression that would ignore the slider, so you could have some base master values on the property remain in safekeeping.

  • Frederic Antoinette

    May 28, 2018 at 8:50 pm

    I believe this would work
    x1 = key(1).value[0];
    x2 = key(2).value[0];
    x3 = effect("Slider Control")("Slider");
    t1 = key(1).time;
    t2 = key(2).time;
    t3 = key(3).time;

    if (time <= t2) {
    x = linear(time,t1,t2,x1,x2)
    }else{
    x = linear(time,t2,t3,x2,x3)
    }
    [x,value[1]]

    change linear interpolation to ease if you are want to ease your animation

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