ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Linking value of single keyframe to slider control while keeping values of other keyframes

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shane Goudy
Linking value of single keyframe to slider control while keeping values of other keyframes
on May 24, 2018 at 8:05:33 pm

I'm working on a lower third for one of my companies brands.

I have 3 keyframes for the X position of the right portion of the lower third.

I need to link the 3rd keyframe to a slider control so the length of the lower third can be adjusted by my coworkers
using the slider control value in Premiere (eventually this will be an essential graphics element).

The other 2 keyframes need to retain their current values.

Unfortunately, I don't know expressions that well.

I've tried using the key(index) and numKeys properties to no avail.

I assume the end expression will be something like this:

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

I've seen similar posts like this in the forum but have yet to find something that addresses this specific issue.

Thanks in advance for whatever help you provide!

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


Return to posts index

Chris Scalzo
Re: Linking value of single keyframe to slider control while keeping values of other keyframes
on Jun 12, 2018 at 9:33:38 pm

I just noticed this didn't have any replies, so I'll give it a go. I personally do not know of any way with an expression, to change values of a keyframe. However, if you have 2 fixed values you are transitioning between, then you want to transition to a third value off a slider you can do that with an expression like the linear() or smooth() functions. Hope this helps.


Return to posts index

Scott McGee
Re: Linking value of single keyframe to slider control while keeping values of other keyframes
on Jun 14, 2018 at 9:14:22 am

Something like this is what you need where the values between the two keyframes can animate like Chris has suggested.

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


Return to posts index

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