Activity › Forums › Adobe After Effects Expressions › locking keyframes to markers ?
-
Raja kamaruzzaman Rc
April 27, 2017 at 3:59 amHi you still there? How do you tweak it exactly? I tried dan’s script but the marker only represent the second keyframe.. whenever I move the marker the animation speed change. I want the marker as a trigger, when the time needle go past the marker then the animation starts.
-
Dan Ebberts
April 27, 2017 at 4:23 amSomething like this maybe:
L = thisComp.layer("Layer With Marker");
if ((L.marker.numKeys > 0) && (numKeys > 0)){
t1 = key(1).time;
t = Math.max(time - L.marker.key(1).time,0);
valueAtTime(t1 + t);
}else
value
Dan
-
Raja kamaruzzaman Rc
April 27, 2017 at 5:53 amOh Yes! That works! thanks for such a fast reply!
Have a Good Day Dan!
-
Raja kamaruzzaman Rc
April 28, 2017 at 7:07 amHi dan.. The script you’re giving is working fine.. but what if I have more than two keyframes? meaning I want the first 2 keyframes play as usual, but only the third and fourth keyframes will be triggered by that marker.
I did this :
L = thisComp.layer(“Layer With Marker”);
if ((L.marker.numKeys > 0) && (numKeys > 0)){
t1 = key(3).time;
t = Math.max(time – L.marker.key(1).time,0);
valueAtTime(t1 + t);
}else
valueKey 1 and 2 does not play at all.
Thanks!
Reply to this Discussion! Login or Sign Up