-
Use a slider to change a certain keyframe’s value
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 = 2n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
if (key(n).time > time) n--;
};if(n==valueKey){
value-valueControl} else value;
Sorry, there were no replies found.