Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Consolidate duplicate precomps when using "Duplicates from Spreadsheet" script by Automation Blocks

Community Beginner ,
Jan 13, 2023 Jan 13, 2023

Hey all,

I’d like to create multiple variants of a video with the help of the “Comp Duplicates from Spreadsheet” script provided by Automation Blocks. But the way I need to use it, I end up with a lot of duplicated pre-comps, which makes further adaptations more difficult.

 

Let’s say I create a template for a product video containing one pre-comp for the product image and one pre-comp for the call-to-action. If I let the script create videos with all possible combinations for 5 different products and 5 different CTAs, I end up with 5 exact duplicates for each product pre-comp as well as for each of the CTA options.

 

Does anyone know how to adapt the script to re-use comps that were already created by the script? Is it possible to have the script first look in the project bin, if the pre-comp already exists with the exact name before it will create a new one multiple times?

 

OR

 

Alternatively would it be possible to create a separate script with Automation Blocks for consolidating duplicate comps (similar to how the AE function "Consolidate All Footage" works)?


(I am aware that AE allows to have multiple comps with the exact same name and different content, but for this case let's assume all comps have a unique name before creating variants from spreadsheets)

 

Thanks a lot,
Sabine

TOPICS
How to , Scripting
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 14, 2023 Jan 14, 2023

Hi Sabine,

 

I just added a tool to the Automation Blocks Community Library for you at

Project/Duplicates/Eliminate Duplicate Project Items

 

It checks if there are any duplicate items in your project (i.e. if they have exactly the same name and are contained in exactly the same bin). If it finds duplicates, it deletes the first one and uses the second instead wherever the first one was used in the project.

 

By default, the tool processes both footage and comp items. Since you only want to elim

...
Translate
Community Expert ,
Jan 13, 2023 Jan 13, 2023
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2023 Jan 14, 2023

Hi Sabine,

 

I just added a tool to the Automation Blocks Community Library for you at

Project/Duplicates/Eliminate Duplicate Project Items

 

It checks if there are any duplicate items in your project (i.e. if they have exactly the same name and are contained in exactly the same bin). If it finds duplicates, it deletes the first one and uses the second instead wherever the first one was used in the project.

 

By default, the tool processes both footage and comp items. Since you only want to eliminate duplicate comps, I recommend to disable the footage item checkbox  at the green block near the top of the script (for faster processing):

Screenshot 2023-01-14 at 14.26.08.png

 

Technical background info:

The tools works such that it renames all project items one by one temporarily. After renaming an item, it checks if an item with the original name could still be found. If this is the case, it knows that there must be a duplicate. If not it renames the item a second time, to go back to the original name. The tool assumes that you have no project item in your project with the name "no project item should have this name", which should be the case for most projects I guess.

 

Let me know if this works for you. 🙂

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 16, 2023 Jan 16, 2023

Hi Mathias,

 

I just downloaded and tested it and it works like a charm! This will be so helpful to me in the future.

 

Thanks a lot for taking the time creating and also explaining how it works technically.

I appreciate it a lot!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2023 Jan 16, 2023

bonus tip:

if you want to run the "Eliminate Duplicates" tool each time you run the "Comp Duplicates" tool, you can also combine them into a single tool. Just attach the code of the "Eliminate Duplicates" at the bottom of the main block stack of the "Comp Duplicates" tool:
Screenshot 2023-01-16 at 10.48.23.png

 

Top copy and paste,

1) open the "Eliminate Duplicates" tool and drag the code into the backpack

2) open the "Comp Duplicates" tool and insert eh code from the backpack

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 16, 2023 Jan 16, 2023
LATEST

That's great, thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2023 Jan 14, 2023

Some more options for avoiding duplicate precomps, when using the Comp Duplicates from Spreadsheet tool (they don't apply to your situation, since you want to void duplicates only if they have identical names, but could be useful for others reading this discussion):


1) By default, the "Create Comp Duplicates from Spreadsheets" does NOT duplicate a precomp, if the precomp layer is locked. Hence, you can simply lock all precomp layers to avoid duplicating them.
2) You could change the block code of the "Comp Duplicates from Spreadsheet" tool to do not duplicate precomps, even if they are not locked. For this just uncheck the checkbox in the block code at the arrow in the attached image:

Screenshot 2023-01-11 at 18.43.06.png

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines