Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Get time from keyframe-position

  • Get time from keyframe-position

    Posted by Mats Jacobsson on May 30, 2008 at 11:26 am

    I’m new in scripting, and I have a problem…

    – I have a null with a angle control keyframed 180 to 0 over time.
    – I have a “Layer 1” where y-rotation is linked to the angle control.

    When I duplicate the “layer 1” i want the rotation to be delayed in time the amount of time where the last keyframe on the slider is. So when I move the last keyframe the delay of “Layer 1” follows.

    Someone who knows?

    Thanks!

    Mats Jacobsson replied 17 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 30, 2008 at 1:11 pm

    Like this:

    prop = thisComp.layer(“Null 1”).effect(“Angle Control”)(“Angle”);
    n = prop.numKeys;
    prop.valueAtTime(time – prop.key(n).time)

    Dan

  • Mats Jacobsson

    May 30, 2008 at 5:23 pm

    Thanks a lot! It worked just the way I wanted!

    /Mats

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