Copy link to clipboard
Copied
I'm designing a lower third for one of our brands and have an animated object with 3 keyframes.
I need to link the 3rd keyframe to a slider so my team can eventually adjust that value in Premiere with essential graphics without affecting the other keyframes.
What expression should I use to do this?
I imagine it would look something like this (with better syntax):
if ( key(index) = 3 ) {
key(index).value = effect("Slider Control")("Slider");
}else
key(index).value = value
Copy link to clipboard
Copied
Has anyone figured out a solution for this? I'm doing the same thing, only I want to link a specific keyframe to a sourceRectAtTime() for the lower third text layer.
Thanks.
Copy link to clipboard
Copied
Almost right. You'll need a Linear expression in there to convert values. Here's a solution that will allow you to control the KF between 0 and the slider value, courtesy of the brilliant Dan Ebberts;
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
Copy link to clipboard
Copied
I like this expression,
But what can I do to link more than 2 keyframes to sliders?
Key1= slider1; key2=slider2; key3=slider3
etc.
Copy link to clipboard
Copied
I'm able to make this work with 2 keyframes but not with anymore than that.
What happens if you have an in and out movement and you want to control both?
I've tried adding
t3 = key(3). time;
t4 = key(4). time;
v3 = effect("Slider Control")("Slider");
linear(time,t1,t2,t3,t4,v1,v2,v3,v4);
v4 = effect("Slider Control")("Slider");
linear(time,t1,t2,t3,t4,v1,v2,v3,v4);
But it's not working.
For context; I need these keyframes to be controlled with a slider so that I can make the motion editable in Premiere Pro
Any help would be super appreciated.
Thanks
Copy link to clipboard
Copied
Try replacing your last line with this:
if (time < t2)
linear(time,t1,t2,v1,v2)
else if (time < t3)
linear(time,t2,t3,v2,v3)
else
linear(time,t3,t4,v3,v4)
Copy link to clipboard
Copied
yeah, it works
Copy link to clipboard
Copied
Is there a good way to control the easing using this method? Or can the keyframes not take on the easing information from the keyframes because it has an expression?
Copy link to clipboard
Copied
Not sure how to do this, sorry
Copy link to clipboard
Copied
Hi Angie,
I made good use of a version of this expression to control a slider when the first keyframe is used on a property of a layer located right at the start of the comp. I am aiming to control the 2nd keyframe on a property with a slider in my case.
if (numKeys > 1){
t1 = key(1).time;
v1 = effect("Y Scale Offset (last KF)")("Slider")*0.6;
linear(time,t1,v1);
}else value
However I would like to make use of an expression which works in the same way when the layer starts halfway along the timeline? Is this possible? Do I need to replace the "time" function with something else?
Thanks