Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linking keyframes to markers

  • Linking keyframes to markers

    Posted by Adam Levine on February 18, 2015 at 6:38 pm

    after following this post (https://forums.creativecow.net/thread/227/10716) I found to link key frames to markers.
    it’s perfect working for only two keyframes. (image 01)

    but how I can link multiple keyframes to markers.. (image 02)

    I want to link that first two keyframes to “INPOINT” Marker and last two keyframes to “OUTPOINT” marker..
    Can anyone help….
    Thank you.

    L = thisComp.layer("Counter");
    if ((L.marker.numKeys > 0) && (numKeys > 1)){
    t1 = L.marker.key(1).time;
    t2 = L.marker.key(2).time;
    v1 = valueAtTime(key(1).time);
    v2 = valueAtTime(key(2).time);
    ease(time,t1,t2,v1,v2)
    }else{
    value
    }

    Adam Levine replied 11 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 18, 2015 at 7:47 pm

    Assuming that values of keyframes 2 and 3 are the same, I think something like this would work:


    L = thisComp.layer("Counter");
    if ((L.marker.numKeys > 1 ) && (numKeys > 3)){
    dIn = key(2).time - key(1).time;
    dOut = key(4).time - key(3).time;
    tIn = L.marker.key(1).time;
    tOut = L.marker.key(2).time;
    if (time < L.marker.key(2).time)
    linear(time,tIn-dIn,tIn,key(1).value,key(2).value)
    else
    linear(time,tOut,tOut+dOut,key(3).value,key(4).value);
    }else
    value

    Dan

  • Adam Levine

    February 18, 2015 at 8:20 pm

    yeah! It’s work like charm…Thank you master Dan….You save my day… 😀 🙂

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