Hi,
I’m developing a UXP panel for Premiere Pro (well, ChatGPT is doing the work…) that manipulates sequence audio clips. The goal of this plugin is to keep only mono or only stereo audio clips in each track.
Currently, I can read and modify clip parameters (volume, enable/disable, etc.), but I can’t:
-
Move an audio clip to another track programmatically
→ The existing createMoveAction() or createCloneTrackItemAction() methods either throw “Illegal Parameter type” or are unavailable for audio track items.
-
Delete disabled clips from the sequence
→ There’s no exposed UXP equivalent of the ExtendScript TrackItem.remove() method.
So right now, I can copy a clip from a track to another, but I cannot erase the original clip. Anyone knows a work around ? Other wise, is there a way for :
You need to study the API a bit before attempting “vibe coding”. Start with the Premiere Pro UXP reference: https://developer.adobe.com/premiere-pro/uxp/ppro_reference/
Quick tip: take a look at createRemoveItemsAction(items). It’s the entry point to build the removal action.
4 Likes
Thanks @Martins247 for the tip on createRemoveItemsAction, that is very helpful for deletion!
However, after testing, I have decided to pivot my strategy. Instead of moving or deleting clips to organize them, I now want to simply flag them visually in the timeline by changing their Label Color.
I am running a diagnostic script on the current Beta API (premierepro v25+), and here is my blocker:
I successfully found that createSetColorLabelAction() exists on the ProjectItem (source media). But I cannot find any equivalent method to set the label color of a specific TrackItem (the clip instance in the sequence).
My specific constraint: I need to target the TrackItem because the same source media might be used correctly (e.g., as Split Mono) in one part of the sequence, and incorrectly (e.g., as Stereo) in another. If I use the ProjectItem method, it updates all instances of that clip in the timeline, which defeats the purpose of flagging specific “bad” clips.
The Question: Is there currently a way to set the label color of a TrackItem directly in the modern UXP API? Or is this property not exposed yet for sequence clips?
Thanks!
Short answer: no.
There’s no API, in either CEP or UXP, around trackItem label colors.
As you’ve likely found, trackItems inherit their projectItem’s label color at time of creation.
You’re not the first to request per-trackItem label control, and it’ll be a while before we get to that.
I’ll suggest to not rely con ChatGPT for UXP, NEVER, it hallucinates methods and properties it thinks it’ll be logically to exist, but they doesn’t exist. If you stick to Adobe’s Documentation you’ll always find a way to make things works.
1 Like
Since you are using a different approach (and color for trackitem won’t be available in the short term), you may consider disabling them instead of marking them with a different color (via action VideoClipTrackItem::createSetDisabledAction(…) )
Doing so will allow you to visually see a difference in the timeline (being grayed out), and you also can query for them via API if needs be ( via VideoClipTrackItem::isDisabled())
(Note that you may have to do the same trick for their matching AudioClipTrackItem)
This approach may work if you only need a binary marker (such as yes/no, true/false, connected/broken, etc…) - and assuming you are not already using the disable flag for something else.
If you were planning to use a color-coding for different meaning (broken, moved, largeFile, etc,…), obviously this solution won’t work
( example with one disabled audio track, making it visually obvious that something is different )