Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression for linking layer duration

  • Expression for linking layer duration

    Posted by Michael Becker on November 7, 2008 at 8:55 am

    hello!

    I allready searched the archive but could not find, what i was looking for.

    I would like to link the duration or outpoint of a layer to another layer in another composition.

    For example, when i trim a layer in „composition a“ to the duration of 125 frames, i would like several layers in „composition b“ to be automatically trimmed to the duration of 125 frames + 25 additional frames.

    I could achieve a similar effect by linking the layers’ transparencies together, but i would prefer to do it by trimming to make it more visible to others.

    it would be great, if somebody could help me with this.

    thanks in advance,
    michael.

    David Cabestany replied 12 years, 5 months ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    November 7, 2008 at 4:26 pm

    A layer’s Out Point isn’t keyframable, so you can’t control it with an expression. An expression for Opacity is the only choices I can think of.

    You could also do it with a script, but it wouldn’t be automatic – you’d have to run the script after you changed the length of the master layer.

    Dan

  • Michael Becker

    November 10, 2008 at 12:25 pm

    hey dan!

    thanks a lot for the info.
    i found a way by linking transparency to a comp marker.
    it is not perfect, but it works.

    thanks again,
    michael.

  • David Cabestany

    January 22, 2014 at 8:24 pm

    Can you share the way you’re doing it?

  • Michael Becker

    February 4, 2014 at 2:58 pm

    hey david,

    sorry for the delay, been on holiday.

    i use an expression on a layers opacity property which is controled by the position of a composition marker in a different composition.

    the expression is:
    if (time < comp(“ControlComp”).marker.key(“0”).time)+1/25) { 100 } else { 0 }

    the value “1/25” equals one frame in a 25fps composition. if you have a different framerate, you should adjust this value.

    if you have any more questions, don’t hesitate to ask.

  • David Cabestany

    February 4, 2014 at 6:41 pm

    Thanks Michael, much appreciated.
    I’ll try it as soon as I ump back into that project.

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