Automation Blocks Scripting in AE: Extend Clips and Set End of Work Area
Copy link to clipboard
Copied
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:
Copy link to clipboard
Copied
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"
Copy link to clipboard
Copied
Fantastic! This tool has been such a help!
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Oh, you where right! At some places in the code I accidentally accessed the active comp instead of the selected ones. I fixed the code now and updated the attachement in my original post above.
Copy link to clipboard
Copied
AMAZING! This one worked great! Thank you!!

