Copy link to clipboard
Copied
The attached script scans the active sequence for a clip with the word "Bug" in its name and replaces that clip with a similarly named clip that lives in the same bin. (Bug_16x9_UHD becomes Bug_16x9_Youtube).
The script works when my sequence and clips live in the same project.
BUT... in my Adobe Productions workflow, the bugs live in one project and the sequences live in a different project within the same Production.
Automation Blocks seems to not be able to find the parent bin of a clip when it doesn't live in the same project as the sequence.
Any ideas?
Hi Sam,
best attach screenshots to your questions, such that me and others can understand the question quicker.
Here is a step by step explanation what your code is doing:
If you want to find the project item in all open projects, you need to loop over all open projects and all items within them explicitly until you found one with that name. Or, if you know in which project and in which bin it is, you can construct the path for that directly (i.e create a string as shown at "Path with proj
...Copy link to clipboard
Copied
Hi Sam,
best attach screenshots to your questions, such that me and others can understand the question quicker.
Here is a step by step explanation what your code is doing:
If you want to find the project item in all open projects, you need to loop over all open projects and all items within them explicitly until you found one with that name. Or, if you know in which project and in which bin it is, you can construct the path for that directly (i.e create a string as shown at "Path with project" here:https://docs.mamoworld.com/automation-blocks/block-reference/prProjectItems#accessProjectItem ).
Copy link to clipboard
Copied
Thank you! That path with project allowed me to make progress.
Is there a way for Automation Blocks to retrieve the parent bin of a sequence clip when the sequence clip lives in different project than the sequence? I know what project the clip will be in, but the exact bin varies depending on what assets I'm trying to swap out and would need to be retrieved by the current clip in the sequence.
Copy link to clipboard
Copied
Have you tried to use the Get Attribute of Clip, to retrieve the project item of the clip, and then use the Get Attribute of Project Item to retrieve the parent bin?
Copy link to clipboard
Copied
Thanks for your reply, @Mathias Moehl
I tried this to see if it would retrieve the information, but it just came back with \theprojectname.prproj
Copy link to clipboard
Copied
that should be the case, if the clip is located in the root bin of the project "theprojectname.prproj".
Copy link to clipboard
Copied
Sorry, I didn't specify. It's returning the name of the project where the sequence lives, not the clip. The clip lives in a different project within the Production (not in the root bin, either). That seems to be what's tripping me up.
Copy link to clipboard
Copied
and what do you get when you alert the Project Item itself instead of its parent bin?
Copy link to clipboard
Copied
\theprojectname.prproj\The_Project_Item.tif
theprojectname.prproj still being the project the sequence lives in, not the project the project item lives in.
Copy link to clipboard
Copied
I just checked this and it seems to be a bug in Premiere Pro's scripting API. I reported this to the Premiere Pro team now. For now, your only option seems to be to loop over the content of your footage project and search for the project item.
Copy link to clipboard
Copied
Wow! We found a bug. Cool!
Yup. I found away to identify the asset and impliment it using different criteria.
There's always a way.
Thank you!