-
Controlling the value AND the timing of a specific keyframe
Hi,
I’m just facing a problem with expression. I’m not good with it, and most of the time I’m searching on the web what I need to copy/paste to get my automation done.
I have two keyframes of position and I want to control the timing and the value of the second keyframe with sliders.
I got this to control the timing :
dur = thisComp.layer(“CONTROL SCRIPT”).effect(“Slider Control”)(“Slider”);
if (time < key(1).time){
value;
}else if (time < (key(1).time + dur)){
t = time – key(1).time;
d = key(2).time – key(1).time;
valueAtTime(key(1).time + d*t/dur);
}else{
t = time – (key(1).time + dur);
valueAtTime(key(2).time + t);
}and I got this to control the value :
if (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
v1 = [964,598];
v2 = thisComp.layer(“CONTROL SCRIPT”).effect(“Point Control”)(“Point”);
linear(time,t1,t2,v1,v2);
}else
valueEach one work well separetly, but how can I blend them together ?
Thanks for your help !
Thibault