Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Trigger Animation through layer Marker

  • Trigger Animation through layer Marker

    Posted by Nathaniel Logan on November 21, 2018 at 7:18 pm

    Hi Dan,

    I was using one of your expression to trigger the keyframes of text layer animation, can we use the Marker name to trigger the Animation so that, i can insert a new marker for animation “Out” so that the animation doesn’t Override.

    preroll = 1;
    L= thisComp.layer("Controller");
    n = 0;
    t0 = time + preroll;
    if (L.marker.numKeys > 0){
    n = L.marker.nearestKey(t0).index;
    if (L.marker.key(n).time > t0) n--;
    }
    if (n < 1){
    t = 0;
    }else{
    t = t0 - L.marker.key(n).time;
    }
    valueAtTime(t)

    Nathaniel Logan replied 7 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 21, 2018 at 8:17 pm

    I haven’t tested this, but if I understand what you’re asking, I think it would be like this:


    preroll = 1;
    L= thisComp.layer("Controller");
    t0 = time + preroll;
    t = 0;
    if (L.marker.numKeys > 0){
    try{
    if (t0 > L.marker.key("Out").time){
    t = t0 - L.marker.key("Out").time;
    }
    }catch(e){
    }
    }
    valueAtTime(t)

    Dan

  • Nathaniel Logan

    November 22, 2018 at 5:23 am

    Thank you, So much Dan. Works like Charm! ????

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy