-
Trigger In and Out animation with comps markers
Hi guys, I’ve searched all the forum to my answer but I didn’t find it.
I’m working on an interface animation, and I need to find a way to trigger an animation (there two simply ease keyframe) of an UI’s elements.
When the cursor passes on it expands, when the cursor leaves it collapse.I’ve set two keyframes (some layers have scale, some position) at the start of my layers and used this expression to trigger the animation’s keyframes from the first to the second.
n = thisComp.marker.nearestKey(time).index;
if (time < thisComp.marker.key(n).time){
n = n-1;
}
if(n==0){
n = 1
}
t = time - thisComp.marker.key(n).time;
thisProperty.valueAtTime(t)So the struggle now is to return from the second keyframe to the first. There is a way to do it with expressions?