Skip to main content
Participating Frequently
September 22, 2022
Answered

ExtendScript - TrackItem.remove() removes linked items

  • September 22, 2022
  • 2 replies
  • 547 views

Hello,

I'll give you an example to explain my issue. If I have both a video and audio clip linked to each other, I would like to be able to delete both with only one API call.

 

From what I know, and I might be wrong, it is not possible since I need to retreive audio and video tracks separatly then call remove() on their items. The issue is that when you have a lot of clips to delete, it would be great to be able (by specifying a parameter) to remove the current clip and all other clips that are linked to it.

 

Is it possible ? If not, is it something you will add later on ?

This topic has been closed for replies.
Correct answer Bruce Bullis

It deletes only one, if they are linked or not doesn't change the outcome


Thanks for confirming.

 

It's unlikely we will add new functionality to PPro's extendscript APIs; until/unless we do, continue to process the audio and video trackitems separately.

2 replies

Bruce Bullis
Legend
September 22, 2022

Does changing the trackItem's linkage, help? 

Here's PProPanel unlinking a trackItem, so as to only delete the video and not audio portions of a clip:

https://github.com/Adobe-CEP/Samples/blob/5490c33ac8355ba394c693deb10414553b0a5685/PProPanel/jsx/PPRO/Premiere.jsx#L1676

AutoCutAuthor
Participating Frequently
September 22, 2022

The issue is that when linked, it only deletes either the audio or the video depending on which one you do the .remove()

I would like to delete both in one API call

Bruce Bullis
Legend
September 22, 2022

Confirming: When they're linked only one is removed, or when they're UNlinked, only one is removed?


AutoCutAuthor
Participating Frequently
September 22, 2022

Also if it is not implemented yet, would it be possible to do it using QE ?

I know it is not supposed to be a supported API, but if it is the only option it would be great to know how to use it