Skip to main content
Participant
November 17, 2023
Question

Automation Blocks Scripting in AE: Extend Clips and Set End of Work Area

  • November 17, 2023
  • 1 reply
  • 1652 views

I've been using Automation Blocks' "Create Comp Duplicates from Spreadsheet" to automate the process of taking lists of vertical videos and converting them to horizontal, plus adding an animated lower third of the user's social handle.

 

Sometimes, the clip that I'm importing is longer than the source clip I have in the composition I'm using as the template, so it ends the imported clip (duplicated on 2 layers) early.  So I drag the clips to their full lenghth, select one of them and press "o" to go to the out point of the clip, then press "n" to end the work area at the clip's out point.  Is there a way to automate these steps into the workflow?  Here is a video of what I do manually that I'd like to automate:

 

 

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
November 27, 2023

Hi Nick,

 

just created the following block script for you:

Just select all comp duplicates you created and run the tool. It should fix the workarea + duration of layer 2 and 3 as requested.

You can easily replace the numbers "2" and "3" if you need to process other layers (or duplicated/delete the blocks to process more than two or just one layer in the comp).

The script is attached. I will also upload it to the community library at 

"Comps/Duplicate/Comp Duplicator Helper/

For All Selected Comps Maximize Duration of Layer 2 and 3 and Set Workarea.xml"

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Nick5FD6Author
Participant
February 24, 2024

Hi there!  I've been meaning to follow up on this for a while, but when I select all the comps in the Project panel and run, I get this error:

 

execute script

execution result:"There is no active composition - please open a composition. (line 1)"

destructor final end point 'main script' reached

 

Any ideas on how to fix?  Thanks!

 

 

Nick5FD6Author
Participant
February 26, 2024

are you running exactly the script above or did you modify it in any way? This script should not rely on any comp being active.
Also, when you run the tool with the block code visible, the blocks which is currently executed is always highlighted. You will see this as a flickering while the tool is running. Which block is highlighted at the end? This is the block at which the error happend. So that helps to understand where exactly the issue occurs.


Thank you for your quick response!  To confirm that it was the original script, I re-downloaded it, renamed it, and deleted the old script from the "Automation Blocks Ae Library."

 

In looking at the blocks, it should work just as you say.  And when I have a composition active, it will perform all the steps on that composition.  If I select a non-active composition in the Project panel, it won't do it on that one, but will still do it on the active composition.  And selecting multiple compositions gives the "there is no active composition" error.

 

I've attached a screenshot of the blocks.  I know next to nothing about programming, and this is the first time I've ever looked under the hood at this script, but does the variable "my comp" reference the active composition by any chance?  That's the only thing I could see in here that might point to the issue.

 

Thanks again!

 

Nick