Apply Cuts to clips in timeline based on marker locations

I want to create a plugin that will look at markers and create clips on V2 of a given size from the clip on V1 at the marker. So, if I have a marker at 01:00 and tell it to create a clip that stars 0:30 before and after that marker it will cut the clip on V1 at those points and clone it onto V2. I’ve tried a couple approaches:

  • getProjectItem for the clip on V1 at the marker location. Then createInsertProjectItemAction, but I see no way to set in/out points for the project item prior to inserting it.
  • APPLYCUT to the clip on V1 at the two points before and after the marker and use createCloneTrackItemAction to clone it to V2. I’m not sure how to properly use the APPLYCUT and haven’t had any success finding guidance on how to use it thus far. I have been able to clone the item to V2, but only the full clip.

Would love to know if what I’m trying to do is even possible at this point in the UXP development or if I’m just not using the right approach.

Thanks in advance.

Hi,

Seems like you need to first cast the ProjectItem into a ClipProjectItem: https://developer.adobe.com/premiere-pro/uxp/ppro_reference/classes/clipprojectitem/#cast

Then (on that newly “casted” object) you can create the in & out points using the createSetInPoinAction methods method ( see some other post for the syntax on how to execute actions - which seems a bit convoluted at first)

2 Likes

That did it. Thanks so much.

1 Like