Skip to main content
Dodam's papa
Participant
July 15, 2022
Question

Question to expression. comp length(stretch)

  • July 15, 2022
  • 1 reply
  • 292 views

I searched a lot but couldn't find the answer I wanted.

 

'A'comp is main, 'B'comp is audio Sauce in 'A'comp

How to set the length of A comp(main comp) to the same length as B comp? How to automate?

 

I will attach a file with a different length to B comp every time.
I hope that the length of B comp will be adjusted according to the length of the attached file every time I work.

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
July 15, 2022

Hi Dodam,

 

Expressions can only change the value of the property they are applied to. They cannot change the duration of a comp or anything else in your project. What you need for this is to write a script. The simples way to write scripts is using my extension Automation Blocks, which is currently in free beta testing phase:

https://aescripts.com/automation-blocks-for-after-effects/

With Automation Blocks you use blocks instead of programming code.

 

This example searches for a composition with name "B" and for a layer with name "music" inside that comp. It then sets the duration of the comp to the duration of that layer.

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Dodamfafa
Participant
July 20, 2022

Thanks! mathias.

 

I'll try the way you told me.

Thank you very much for your answer and help.