Skip to main content
Participant
April 28, 2023
Question

Automation Blocks: swap Subcomp Layers when Duplicating from Spreadsheet

  • April 28, 2023
  • 1 reply
  • 518 views

Hey Guys, I am new to Automation Blocks and I am trying to alter the build in Script "1 Export Spreadsheet from Template Comp". My goal is to swap Subcomp Layers (which are already created in the Project) additionally to Text and Footage Layers.
The Import Script will probably also need an adjustment.

Any Help appreciated!

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
May 5, 2023

Hi,

I just added a new variant for you, which supports replacing precomps,  to our Community Library.

Here is the direct download link:

https://www.dropbox.com/sh/hxlejesewox6iaa/AAC-xsoDneF0DvGbeKPLnuNxa?dl=0

 

How to Use

Rename the precomp layer to something like "$C weather precomp" AND lock the precomp layer. Then the project item of the precomp will show up in spreadsheet column C. If you then enter in column C somethinig like "clouds comp", the layer "$C weather precomp" will be set to the project item with name "clouds precomp" (Automation Blocks will look for a comp with that name first in the root folder of the project and if there is no such item, also search for it in subfolders). Instead of a name you can also enter a full path to the project item like "path/to/clouds precomp" (to use the comp clouds precomp inside the bin named "to" which in turn is contained in the bin named "path".

 

It is important to lock the precomp layer. Otherwise, the tool will not just replace the precomp, but also duplicate the original precomp (and process the contant of that duplicate).

 

What is changed in the code

I just needed to add the parts marked with the orange box:

Export script:

 

Import Script

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Mathias Moehl
Community Expert
Community Expert
May 5, 2023

PS: In the import script I also needed to add an extra condition to ensure that locked precomps are not renamed:

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects