ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Use a slider to change a certain keyframe's value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matias Andersen
Use a slider to change a certain keyframe's value
on Jan 23, 2018 at 7:08:23 pm

I'm trying to do some simple position animation with keyframes, but I want to be able to change the 2nd keyframe's X & Y values with a slider.
I haven't been able to find an expression that does that, and I have little to no skills in coding, I only know the basics.

Just to clarify, I only want the 2nd keyframe's values to change, I don't want the expression to change the position of the layer itself, since I still want the keyframe animation.

I found an expression here which kind of does what I need, exept that it doesn't keep the keyframe's animation.

valueControl = thisComp.layer("Adjustment Layer 2").effect("Slider Control")("Slider")
valueKey = 2

n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
if (key(n).time > time) n--;

value-valueControl} else value;

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved