ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Linking a keyframe to a specific slider control value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
tobias ochott
Linking a keyframe to a specific slider control value
on Jun 7, 2017 at 4:45:21 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


Return to posts index

Scott McGee
Re: Linking a keyframe to a specific slider control value
on Jun 7, 2017 at 7:35:54 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.


Return to posts index

tobias ochott
Re: Linking a keyframe to a specific slider control value
on Jun 7, 2017 at 8:14:31 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


Return to posts index


Dan Ebberts
Re: Linking a keyframe to a specific slider control value
on Jun 7, 2017 at 8:21:30 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



Return to posts index

Dan Ebberts
Re: Linking a keyframe to a specific slider control value
on Jun 7, 2017 at 7:38:51 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



Return to posts index

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