Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using XML to create a custom label color

Community Beginner ,
Sep 27, 2021 Sep 27, 2021

Hi,

 

I'm wanting to use a custom label color for a few clips that will be repeating throughout my sequence.

 

Right now I have this within each clipItem, which works:
<labels>
<label2>Forest</label2>
</labels>
 
But could I do something like this?
<labels>
<label2>New Purple</label2>
<color>#a033f3</color>
</labels>
 
Or anything similar? 
TOPICS
Formats , How to , Import , SDK
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Sep 27, 2021 Sep 27, 2021

Mangling XML files to specify label colors is unsupported, and not recommended.

PPro's ExtendScript API contains the getColorLabel() / setColorLabel() calls I referenced; here's some example code.

Translate
Adobe Employee ,
Sep 27, 2021 Sep 27, 2021

I'm not sure what a clipItem is; do you mean projectItem, or trackItem? 

For projectItems, you can use getColorLabel() / setColorLabel(). Note: trackItems created from a projectItem will not have their label color updated; any new trackItems created from those projectItems, will get the updated label.

Also...what, specifically, are you editing, the .prproj file?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 27, 2021 Sep 27, 2021

I'm editing an XML file that I import to Premiere.

 

And by clip item I mean the item that gets displayed in the timeline:

 

<sequence>
<media>
<video>
<track>
<clipitem id="clipitem-100001">
						<name>Movie 1</name>
						<start>0</start>
						<end>30</end>

						<masterclipid>masterclip-100000</masterclipid>
						<enabled>TRUE</enabled>
						<rate>
							<timebase>30</timebase>
						</rate>
						<file id="file-100003">
							<name>Movie 1.mp4</name>
							<pathurl>./PNGs/Movie_1.mp4</pathurl>						
						</file>
						<labels>
							<label2>Rose</label2>
							(Where would this go? setColorLabel(#00FFFF))
						</labels>
					</clipitem>

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 27, 2021 Sep 27, 2021

Mangling XML files to specify label colors is unsupported, and not recommended.

PPro's ExtendScript API contains the getColorLabel() / setColorLabel() calls I referenced; here's some example code.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 27, 2021 Sep 27, 2021

Thank you for the quick response.

 

I have a newbie question, can you give me any more info about the link you just sent? Is that something that I would import into PR somehow? Do I just edit that in any IDE? What language is it? How do I find a user guide on how to create in that for PR?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 27, 2021 Sep 27, 2021
LATEST

Happy to help!

Like most Adobe applications, PPro supports CEP-based extensions; these panels are, at some level, web pages, but have two special powers: 1. They can access the local file system, and 2. They can drive the host application via ExtendScript. 

Here's info about getting started with panels: 

https://github.com/Adobe-CEP/Getting-Started-guides

Here's the PPro-specific example panel: 

https://github.com/Adobe-CEP/Samples/tree/master/PProPanel

Here are PPro's ExtendScript API docs:

https://ppro-scripting.docsforadobe.dev

Feel free to reach out (directly) with any questions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines