Skip to main content
Known Participant
January 22, 2022
Answered

Automatize changing color label of clips in timeline : Node.js

  • January 22, 2022
  • 1 reply
  • 887 views

Hello guys, and thanks in advance for the kind reply 😃 . 

I'm trying to reach an old goal, that is: automatize changing color label of clips in timeline. I'm trying the following.

 

a) define custom Premiere Pro shortcuts,  one per label color.

b) Write an AutoHotkey executable, that presses the proper buttons when launched, activating the shortcuts defined in (a)

c) Use the node.js library called Child process [1], implemented in my own extension, in order to launch the previous executable automatically, according with some triggering condition implemented inside my script.

 

Now, I'm not a professional programmer, and stuff like node.js and Autohotkey are totally new for me. 

So, just before  starting a useless work, I ask you: do you think that such scheme could be doable? 

 

My biggest concern is about the implementation of the node.js library and commands inside my extension. 

Reading the article [1], it seems that the node.js code should be inserted inside the "client side"(html) code, and not in the "server side" (jsx) part of the code. Is that correct? the problem is that the triggering functions are in .jsx , so I think that, once activated, they should pass back to the html, right?

 

Do you have some tutorial/ guide , that could help me in this new adventure? 

 

 

[1] https://nodejs.org/api/child_process.html

 

[2] https://community.adobe.com/t5/premiere-pro-discussions/question-about-node-js-implementation-in-jsx-file/m-p/9566216#M121476

Correct answer Bruce Bullis

You don't need node.js.


PPro's ExtendScript API allows for the label color of projectItems to be changed, but any trackItems based on those projectItems will NOT be updated based on that change, and there is no API for updating the label color of existing trackItems. 

 

I'll add your vote to feature request DVAPR-4217788, "Provide a method to change the label color of a trackItem".

 

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
January 24, 2022

You don't need node.js.


PPro's ExtendScript API allows for the label color of projectItems to be changed, but any trackItems based on those projectItems will NOT be updated based on that change, and there is no API for updating the label color of existing trackItems. 

 

I'll add your vote to feature request DVAPR-4217788, "Provide a method to change the label color of a trackItem".

 

Known Participant
January 24, 2022

Hello Bruce, and thanks for the quick reply.

 

Unfortunately I can not follow the solution you are proposing me:

 

Clips I'm dealing with are .mogrt files, hence no projectItems I can modify. 

 

The path I'm trying to define, "emulates" the key pressing I could do by hand, through an .exe executable file. 

 

The idea is to trigger such .exe file through the extension, and this is where I need the node.js programming language .

 

 do you think that the scheme I'm imaging could be practically doable? Or there is some limits that I'm not considering?  

 

Reading the article [1], it seems that the node.js code should be inserted inside the "client side"(html) code, and not in the "server side" (jsx) part of the code. Is that correct? the problem is that the triggering functions are in .jsx , so I think that, once activated, they should pass back to the html, right?

 

Do you have some tutorial/ guide , that could help me in this new adventure? 

 

 

Bruce Bullis
Community Manager
Community Manager
January 24, 2022

The idea is to trigger such .exe file through the extension, and this is where I need the node.js programming language.

Again, node.js will not help you.

 

For any label changing of trackItems, you would need us to implement DVAPR-4217788 first, which would enable PPro's ExtendScript API (which, while based on JavaScript, does not support node.js) to make that change.