ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Automatically Time Stretch Layer to Comp Length?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
C. Blake Davis
Automatically Time Stretch Layer to Comp Length?
on Dec 17, 2019 at 7:01:37 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


Return to posts index

Andrei Popa
Re: Automatically Time Stretch Layer to Comp Length?
on Dec 18, 2019 at 7:09:54 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.


Return to posts index

Andrei Popa
Re: Automatically Time Stretch Layer to Comp Length?
on Dec 18, 2019 at 7:10:52 am

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

Andrei
My Envato portfolio.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]