-
Control value of two keyframes with one slider.
Hello After Effects masters,
I’m creating a template in which the end user would be able to adjust a lowerthird to the length of a name he/she wants to use.
I’ve made a simple in-animation and out animation.
So this is my setup:
Keyframe 1: 00:00 (value is 0)
Keyframe 2: 02:00 (value is defined by the slider)
Keyframe 3: 04:00 (value is defined by the slider)
Keyframe 4: 06:00 (value is 0)What I want is one slider to control the value of keyframe 2 and 3.
But it should not create a new keyframe if you adjust the slider, it will only adjust the value of those two keyframes.2019-11-0515_16_26-nvidiageforceoverlay.png
What should be the expression for this?
I’ve found this expression online but it is not working for my animation.I hope someone can help me.
Thanksif (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
v1 = [95, 95]; //or if it's 3d [95, 95, 95]
slider = comp("INPUT").layer("CONTROL").effect("Zoom intensity")("Slider");
v2 = [slider, slider]; // or [slider,slider,slider] if 3D
linear((time, t1, t2, v1, v2);
} else {
value
}