Skip navigation
Currently Being Moderated

Can I control the in and out point of a layer with a keyframe?

Jul 19, 2013 8:44 AM

Hi all, I'm working in a sort of template for a series of mograph videos. Some sort of motion typography work.

The animation is always the same but the only thing that changes is the length of the video (for legibility purposes).

I was wondering if I can control the in and out points of a layer with the keyframes from another layer.


Lets say Layer's A keyframe from slider 1 position in time is the out point (plus/minus an offset would be also great) of layer B.


I've been playing with expressions on a regular basis but I don't really know where and how to write an expression like that or if it's possible.


Thanks in advance

  • Currently Being Moderated
    Jul 19, 2013 6:53 AM   in reply to Pablo Apiolazza

    This should probably be moved to the expression forum then.


    I'm not sure I understood the details of your project but here's a basis: you can do that with an expression in the layer's time remapping property. So if you want a layer to start playing at the second keyframe on another layer, you can try something like (writing in my browser, watch for mistakes):


    //   The "number" of the keyframe (first, second, third, etc)
    var index = 2;
    //   The layer with the keyframes
    var l = {pick-whip the layer with keyframes here};
    //   Just a safety, check the layer has at least enough keyframes
    if (l.numKeys >= index)
         //   If yes, the new time is the difference between the keyframe's time and the current time
        max(0, l.key(index).time-time);
         //   Doesn't matter, let's return 0
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points