Unique Identifiers for VideoClipTrackItems?

Hello!

Is there an intended means for keeping track of VideoClipTrackItem objects other than using the object itself?

As far as I can tell there isn’t any kind of exposed unique identifier on VideoClipTrackItem objects that can be used to keep track of them and re-fetch the object for making modifications to it in the future. For short running scripts that you can do in a single session, you can just keep track of the entire object itself, being careful not to let it serialize/deserialize, else it loses its methods. But for long running multi-session tasks, or tasks that require passing objects between modules, is there any way to store a unique identifier of a given VideoClipTrackItem so that it can be re-fetched and modified in the future?

The best workaround that I’ve come up with for multi-session tracking is to spoof some kind of empty video effect that only contains a UUID in the metadata and attach that to a given VideoClipTrackItem so that it can be re-found later. I haven’t implemented this quite yet but it seems like it should work.

On a separate note - I’m also surprised that createOverwriteItemAction doesn’t return the VideoClipTrackItem it creates in the sequence. The workaround I’ve found to retrieve a given VideoClipTrackItem after it is created is to make an array of all VideoClipTrackItems on a given track, perform createOverwriteItemAction then re-scan the entire track looking for the VideoClipTrackItem that isn’t in the starting array. I’m guessing there is some obscure limitation in UXP or the core Premiere Pro program that makes it impossible to return VideoClipTrackItem from createOverwriteItemAction.

Any advice would be greatly appreciated! Thank you.

5 Likes