-
Linking Keyframes To Layer Marker Question
Hi. I looking for some advice on linking keyframes to a layer marker.
Normally I only do this with two keyframes using the expression seen below. I’ve seen other examples of this expression linking multiple keyframes to different layer markers. But this isn’t what I’m trying to do.
I’m trying to figure how to apply some form of this expression to a layer with three keyframes. Keyframes 1 to 2 are a quick animation in. Keyframes 2 to 3 are a slow movement that continues from keyframe 1. So basically a quick animation in, then slow movement. I’d like to be able to control where the last (3rd) keyframe ends in my comp with a layer marker. Is this possible with some form of the expression below?
L = thisComp.layer("Control");
if ((L.marker.numKeys > 0) && (numKeys > 1)){
t1 = key(1).time;
t2 = L.marker.key(1).time;
val1 = valueAtTime(key(1).time);
val2 = valueAtTime(key(2).time);
linear(time,t1,t2,val1,val2);
} else {
value;
}