Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Automatically Time Stretch Layer to Comp Length?

  • Automatically Time Stretch Layer to Comp Length?

    Posted by C. blake Davis on December 17, 2019 at 7:01 pm

    Hey does anyone have an expression for finding the end of a clip and automatically timing footage to stretch to the end of the comp?

    Right now I’m replacing footage in my comp, then opening the “Stretch” dialogue and PASTING the comp duration into the “New Duration” to stretch the footage to fit the comp.
    What I’d like to find is a script that AUTOMATICALLY does this, so I can easily replace the layer whenever a client sends me new footage to drop into their template and quickly export, saving me clicks in my workflow.

    Producer working in NorCal and Nashville

    Andrei Popa replied 6 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    December 18, 2019 at 7:09 am

    Enable time remapping for the layer.

    Go to a time that you think would be the biggest you would ever have. You can exceed the comp duration by clicking on the blue timer in the left side of the time-line and writing the time you want to go to.

    Let’s pretend 10 minutes is the max. So you type 10:00:00. Now press alt+] to set the layer outPoint to 10 mins.

    In the timeline write this expression:


    linear(time,0, thisComp.duration,0,timeRemap.key(2).time)

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 18, 2019 at 7:10 am

    You must write the expression in the time remap property. Sorry for the mistake.

    Andrei
    My Envato portfolio.

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