ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shane Goudy
How to Link Value of a Keyframe to a Slider Control without affecting values of other keyframes
on May 24, 2018 at 8:32:46 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!


Return to posts index

Steve Bentley
Re: How to Link Value of a Keyframe to a Slider Control without affecting values of other keyframes
on May 25, 2018 at 5:18:50 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.



Return to posts index

Frederic Antoinette
Re: How to Link Value of a Keyframe to a Slider Control without affecting values of other keyframes
on May 28, 2018 at 8:50:43 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]