Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now