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

Automation Blocks - Asset Swap Script

Participant ,
Oct 22, 2024 Oct 22, 2024

Hello @Mathias Moehl !

 

I'm having an issue with the attached script that I'm hoping you can help me with. It swaps out one asset for another in the timeline based on the clip names. It was lengthy to type out, so I made a 1 minute video explaining it instead.

 

TOPICS
SDK
625
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 ,
Oct 23, 2024 Oct 23, 2024

Hi Sam,

it is important to understand here, that project items can be specified in all kinds of ways:

https://docs.mamoworld.com/automation-blocks/block-reference/prProjectItems/#accessProjectItem
Among other things, you can specify a name or path of a project item or a name or path of a file.
If you specify a project item as 
Bin\Movie.mp4
it will look at a project item named "Movie.mp4" inside the project panel bin ""Bin".
But if you only specify it as
Movie.mp4
it will first check, it will loop over all project items of the project and search for one that has either a footage file with name "Movie.mp4" or the name "Movie.mp4". If there are several hits, you cannot be sure which one is used (Automation Blocks uses the first one it finds).
Hence, you need to be more specific to avoid the confusion and specify not only the item name, but the full path:
Screenshot 2024-10-23 at 20.31.59.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
Participant ,
Oct 23, 2024 Oct 23, 2024

Excellent! That worked. Thanks @Mathias Moehl! And my typical workflow usually consists of the standard and DM files being in different bins, so that will be great!

 

Just out of curiousity - is there a way to differentiate even if they happen to be in the same bin? I looked in the documentation you provided but none of the examples there would seem to do the trick.

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 ,
Oct 23, 2024 Oct 23, 2024
LATEST

Adding the path will help even if they are in the same bin.
foo\file.mp4
will tell AB: use the project item in the bin "foo" with name "file.mp4".
but if you just use
file.mp4
it will tell AB: look in the entire project for a project item with name OR footage file name "file.mp4" 
If you want to access a project item with name "file.mp4" in the root bin only, you can use
\file.mp4

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