Hello Adobe Developer Community,
I’m currently working with the Premiere Pro UXP API to develop an extension, and I’m trying to add all clips from a specific folder in the project panel to a sequence in one operation. While exploring the documentation, I found classes like Sequence
, ClipProjectItem
, and AudioClipTrackItem
, but I couldn’t identify a clear way to accomplish this task programmatically.
Here’s the workflow I’m aiming to implement:
- Select a folder in the project panel that contains multiple clips.
- Add all clips from that folder into a specific sequence (
Sequence
) at sequential timecodes, starting from the beginning of the sequence.
From my research, it seems there’s no direct API in UXP to add clips to a sequence programmatically, as was possible with the insertClip
method in CEP. Could you confirm if this functionality exists in the UXP API? If not, is there any alternative or workaround to achieve this goal?
Any insights, examples, or related documentation would be greatly appreciated.
Thank you for your help!
Best regards,
Hi!
Unfortunately yes, these APIs are not available in UXP right now (specifically, the equivalent of insertClip
API and getSelection
API for getting selected folder)… We are actively working on testing and getting those API published.
I don’t see any workaround to achieve the workflow at this point. The closest thing available is to use project.createSequenceFromMedia
to create a sequence with input clip like sample code below:
// say you get a valid `ProjectItem` that can be casted to `ClipProjectItem` (= a projectItem that represent clip in project panel) and `Project` instance
const clipProjectItem = ppro.ClipProjectItem.cast(projectItem);
// create a new sequence that has input sequence name and input clip at beginning of timeline
await project.createSequenceFromMedia(sequenceName, clipProjectItem);
Thanks so much for trying out and looking into UXP!
1 Like
I see, you’re right - the single-clip limitation of createSequenceFromMedia
is quite restrictive for our needs. Given this constraint, we’ll continue with the CEP implementation for now.
Really excited to hear that you’re actively working on the insertClip
and getSelection
APIs for UXP! These will be game-changing additions that will enable much more flexible sequence manipulation workflows.
Keep up the great work on UXP development! Looking forward to the updates and new APIs. Please keep us posted on the development progress!
1 Like