Activity › Forums › Adobe After Effects Expressions › Control the size of one keyframe.
-
Control the size of one keyframe.
Posted by Nikolas Giannis on February 5, 2014 at 11:21 amHello. I have a shape. Shape has a scale animation (0-100%). I created an Adjustment layer (Shapes_Control) and added the “Slider control”. I wanna bind the 2nd keyframe to the “Slider Control”. Shape has animation only X axis. Anyone can help me with an expression?
I’m not a native English speaker, so excuse me if I don’t clearly explained.
Patrick Evans replied 6 years, 4 months ago 8 Members · 23 Replies -
23 Replies
-
Matthew Talesfore
February 5, 2014 at 11:57 pmI think I understand…
Start with your “slider” on a ‘Null layer’.
Then I would attach the following expression to the scale of your circle layer.
trans = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”)+transform.scale[1];
[transform.scale[0], trans]-Matt
-
Nikolas Giannis
February 6, 2014 at 7:08 amIt’s not quite what I need.
So, I have animation. Left to right. 1st keyframe: x:0, y:100. 2nd keyframe: x:100, y:100. Animation X-axis only.
I need to bind the second keyframe to the slider control. For exemple, I put a value of 300 in the slider.
Animation should be:
1st keyframe: x:0, y:100. 2nd keyframe: x:300, y:100.
I tried your expression, but I didn’t succeed 🙁 -
Dan Ebberts
February 6, 2014 at 2:40 pmSomething more like this, I think:
x2 = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
x = linear(time,key(1).time,key(2).time,key(1).value[0],x2);
[x,value[1]]Dan
-
Nikolas Giannis
February 6, 2014 at 2:58 pmYes, this is what I need. Perfectly works. Thank you so much.
-
Nikolas Giannis
February 7, 2014 at 1:34 pmHello again. I still have a few questions. Dan, your expression perfectly works. I need an expression for this scheme:
1st keyframe: x:0, y:100,
2nd keyframe: x:100, y:100,
3rd keyframe: x:100, y:100,
4th keyframe: x:0, y:100.
So, this is fade in and fade out animation. I need to bind the second and third keyframes.Also, I have a shape that has this animation:
1st keyframe: x:20, y:0,
2nd keyframe: x:20, y:100,
3rd keyframe: x:20, y:100,
4th keyframe: x:100, y:100.
5th keyframe: X:0, y:100.
I need to bind the 3rd and 4th keyframes.
So, please explain to me how to change the expression.And the last. If a shape has no animation, but I wanna control a size using a slider. How can I do this? Thanks.
-
Nikolas Giannis
February 7, 2014 at 6:13 pmYes. I need to bind the 2nd and 3rd keyframes to a slider control 🙂 Your expression for the binding of the second keyframe works, but I can’t edit it. Explain to me how to do it, please 🙂
-
Dan Ebberts
February 7, 2014 at 6:55 pmThat would look like this:
sVal = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
if (time < key(2).time)
x = linear(time,key(1).time,key(2).time,key(1).value[0],sVal)
else if (time < key(3).time)
x = sVal
else
x = linear(time,key(3).time,key(4).time,sVal,key(4).value[0]);
[x,value[1]]Dan
-
John Wolf
February 10, 2017 at 3:37 pmHi,
this is perfect:
x2 = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
x = linear(time,key(1).time,key(2).time,key(1).value[0],x2);
[x,value[1]]but I need use Point Control, can you edit expresions for this? Thank you very much.
John
-
Braian Dovidenko
August 10, 2018 at 4:12 pmHi Dan, you are our guru, thank you.
I wanted to consult you:
I want to be able to modify with a slider controller the size of X and Y separately. But I have an animation made in X.I hope you have explained me well.
Thanks you!
Braian
x2 = thisComp.layer("Nulo 8").effect("ancho tweet")("Deslizador");
x = linear(time,key(1).time,key(2).time,key(1).value[0],x2);
[x,value[1]]
Reply to this Discussion! Login or Sign Up

