Skip to main content
レディントン
Participant
September 5, 2024
Answered

Cannot get label color from script

  • September 5, 2024
  • 1 reply
  • 227 views

I want to use Extend script to get the color of the labels of the clips in a Premiere pro sequence.
However, I keep getting “undefined”.
The clips in the sequence are labeled with various colors as shown in the image.
I have looked in various explanatory articles, but I could not find the answer.
If you could tell me how to do this, I would appreciate it.

 

What the Console Displays↓

3 undefined 4

 

var project = app.project ; var sequence = project.activeSequence ; 
$ .writeln ( sequence.videoTracks.numTracks ) ; 
$ .writeln ( sequence.videoTracks [ 0 ] .clips [ 0 ] .labels ) ; $ .writeln ( sequence.audioTracks.numTracks ) ;​​​​​
​​​​​​​​​

 

 

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

trackItem objects don't have a 'labels' member, nor an API for get/setting label color.

trackItems inherit their source projectItem's label color, at the time of their creation; there's no API around changing a trackItem's label color, after the instantiation.


1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
October 3, 2024

trackItem objects don't have a 'labels' member, nor an API for get/setting label color.

trackItems inherit their source projectItem's label color, at the time of their creation; there's no API around changing a trackItem's label color, after the instantiation.