Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linking multiple keyframes to layer markers

  • Linking multiple keyframes to layer markers

    Posted by Boy Van dulmen on December 17, 2012 at 1:12 pm

    Hi there!

    I’ve got a question that I couldn’t get answered searching existing posts, so here it goes!

    Long story short: I’m trying to link multiple keyframes to multiple layer markers. I need to make a foolproof AE project: when someone wants to re-lengthen the animation all they have to do is drag the second layer marker and the animation lengthens accordingly. The user wouldn’t need to fiddle with numerous keyframes.
    The point I am at right now is this:

    With this expression I’m able to link two keyframes to two individual layer markers.

    When the layer markers are moved, the animation time scales accordingly. The point I’m trying to get to is this:

    I would like to link more keyframes (lets say two for this example) to a layer marker so that the animation scales accordingly, but keeps its original timing in the first and last keyframes.
    (for this example: scale from 0% to 100% in a ‘fixed’ time > adjustable length of animation > scale from 100% to 0% in a ‘fixed’ time).

    I’ve tried adding more keyframes to a marker, but somehow it doesn’t work…
    Does anyone know how to get this done?

    Thanks!

    L = thisComp.layer("test");
    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
    }

    Ben Black replied 11 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Ben Black

    October 13, 2014 at 4:09 pm

    Did you ever figure this out?

    cargocollective/benblack

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