ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Script for making the length of a layer fit the entire duration

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Scott Green
Script for making the length of a layer fit the entire duration
on Feb 6, 2019 at 11:43:38 am

I've done some searching but have found no results that would help me to make a layer (i.e. a solid background) fit the entire duration of a comp, so if I wanted to change the duration of the comp the script would adjust the layer to fit the comp. I imagine it might be quite a simple one for someone, any ideas? Thanks.


Return to posts index

Andrei Popa
Re: Script for making the length of a layer fit the entire duration
on Feb 6, 2019 at 12:00:01 pm

Are you sure you are searching for a script? Because a script would need you to press a button or some similar action to trigger the modification of the length of the solid. However, if a script is what you are searching for, this could help


myLayer = app.project.activeItem.selectedLayers[0];//Make sure your layer is selected
myLayer.outPoint = (app.project.activeItem instanceof CompItem) ? app.project.activeItem.duration : myLayer.outPoint;


Andrei
My Envato portfolio.


Return to posts index

Scott Green
Re: Script for making the length of a layer fit the entire duration
on Feb 6, 2019 at 12:04:56 pm

I mean an expression, where would I put that script?
I thought maybe to the Time Remapping control but a solid doesn't have one, pre-composing it didn't work either?


Return to posts index


Andrei Popa
Re: Script for making the length of a layer fit the entire duration
on Feb 6, 2019 at 12:09:56 pm

Maybe you could make it very long in the first place. Think what max duration of your comp might be, and make the solid that duration. To do that without script, just click the time stamp in the left side of the timeline area. And there write the max duration you think it could have(in hours:min:seconds:frames. Ex: 1200 for 12 seconds,11200 fo one minute 12 seconds). Now, with your layer selected, hit ] on your keyboard. Now your solid is this length. If you make your comp bigger, the solid is already bigger.

Andrei
My Envato portfolio.


Return to posts index

Scott Green
Re: Script for making the length of a layer fit the entire duration
on Feb 6, 2019 at 12:14:27 pm

OK that's fine, I'll just do it that way, thanks anyway.

Motion Videos UK - We are creative video designers who bring pleasure, meaning and beauty to our small world through film, motion graphics and animation.


Return to posts index

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