-
Link Single Scale Keyframes to Sliders and keep others unchanged.
Hi there,
I have a simple animation that has 4 keyframes on the Transform effect’s Scale parameter of an adjustment layer to control footage below it.
I would like the first keyframe to remain at 100% scale, the second keyframe to be linked to Slider1 that will allow for a scale adjustment, the 3rd keyframe to be linked to Slider2 that will allow for a scale adjustment, and the 4th keyframe to remain at 100% scale.
I’ve found the following expression from Dan Ebberts (Who seems to provide a lot of help on this forum, so thank you for all of the help!), but the expressions is for only 2 keyframes, and 1 slider:
if (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
v1 = 0;
v2 = effect("Slider1")("Slider");
linear(time,t1,t2,v1,v2);
}else
valueHow can I change this to make it work for my scenario? I tried the following, but couldn’t get it to work:
if (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
t3 = key(3).time;
t4 = key(4).time;
v1 = 100;
v2 = effect("Slider1")("Slider");
v3 = effect("Slider2")("Slider");
v4 = 100;
linear(time,t1,t2,t3,t4,v1,v2,v3,v4);
}else
valueI’m getting the following error:

Thanks so much for any help!!