Can UXP be used to add a media asset and its proxy to a Premier pro project file?

I’m working on a project where a customer wants to use Vantage to ingest camera files and create a proxy file to be then added to a Premiere Pro project file. I’d been looking at using UXP to do and I can add a media file to a project but only to the top root bin and not to a sub bin like “Rushes”

Looks like proxy attachment cannot be automated. Adobe’s Premiere 26 UXP API does not expose
a way to get a clip reference after importFiles() - the method returns only a
boolean. Without a ClipProjectItem reference, attachProxy() cannot be called.

The follwoing have been noticed.

  • importFiles() returns boolean only, no clip reference
  • ClipProjectItem.findItemsMatchingMediaPath() exists as an instance method
    but there is no way to obtain a ClipProjectItem instance after import
  • BinProjectItem.getItems() does not exist - only RootProjectItem has it
    meaning nested bins cannot be traversed

I can add a media file to a project but only to the top root bin and not to a sub bin like “Rushes”

Not so; importFiles() takes a target bin (projectItem) parameter. And yes, it returns a boolean, not projectItems. findItemsMatchingMediaPath() is a fine approach.

Looks like proxy attachment cannot be automated.

Not so; the sample demonstrates this.

…nested bins cannot be traversed

Not so; the sample demonstrates this.

To add to bbb’s reply, if you are importing the same file multiple times, and thus findItemsMatchingMediaPath() wont work for you, you can use a diff technique where you look at all the ProjectItems before/after your imports to keep track of which ProjectItem is which. We use this technique and it is reliable.

1 Like