Skip to main content
Corvinus Corax
Inspiring
June 30, 2020
Answered

Essential Graphics panel "Event listener" ? (ExtendScript)

  • June 30, 2020
  • 1 reply
  • 984 views

Is there a way to have an ExtendScript panel listen for changes made in Essential Graphics? Or maybe with an inbetween step using expressions? That would lead to the question "Is it possible to "feed" ExtendScript panels with values generyted by Expressions" ?

 

E.g:

EG Button is pressed -> ES Panel, waiting for this button event, executes code now

or

EG Button is pressed -> Expression calculates something and gives value to -> ES Panel that executes code that was waiting for this value (e.g. to use in a function)

This topic has been closed for replies.
Correct answer Mylenium

Not really. Way too many limitations. Expressions and scripts don't really interact to begin with, so there's nothing to wait for simply there's no specific event handler for expressions. A script many times doesn't even know a property value unless you convert the information to keyframes or reconstruct the underlying formula/ code natively in the script. Even then the typical procedure in the script is to retrieve those values, do the processing and re-apply the new keyframes or expressions, effectively eradicating what was there before. And then of course there's the thing that Premiere itself has limited script support, anyway, and pretty much none of that would work. If at all, it would be stuck in AE. in any case, this is one of those 99% "No" answers. Whatever you have in mind will require a different approach, so it might be better if you actually explained what you are trying to do.

 

Mylenium

1 reply

Mylenium
MyleniumCorrect answer
Brainiac
June 30, 2020

Not really. Way too many limitations. Expressions and scripts don't really interact to begin with, so there's nothing to wait for simply there's no specific event handler for expressions. A script many times doesn't even know a property value unless you convert the information to keyframes or reconstruct the underlying formula/ code natively in the script. Even then the typical procedure in the script is to retrieve those values, do the processing and re-apply the new keyframes or expressions, effectively eradicating what was there before. And then of course there's the thing that Premiere itself has limited script support, anyway, and pretty much none of that would work. If at all, it would be stuck in AE. in any case, this is one of those 99% "No" answers. Whatever you have in mind will require a different approach, so it might be better if you actually explained what you are trying to do.

 

Mylenium

Corvinus Corax
Inspiring
July 1, 2020

I was afraid so 😉

 

Regarding your question what I'm doing: I create quite large design toolkits for the creative departement of multiple TV Stations and built my first versions with Essential Graphics and Expressions. Now I'm about to move on to custom ExtendScript Panels, as Essential Graphics does not have enough features for my needs any more (starting with dropdowns and radio buttons, but reaching far deeper than that). I'd hoped I could use both systems side by side for a version or two before switching completely to a custom panel by using some sort of exchange between the panels.

 

 

Practical example: I move groups of layers in mutliple comps based on user inputs to where some graphics have to be at a given time -> e.g. the "second" graphic in this sequence needs to start at 00:00:07:00, so move it there in all comps that use this graphic. But I also have some dependencies for those graphics that are currently tied to checkboxes in the Essential Graphics Panel -> Start time of the "second" graphic is controlled by ExtendScript User Input, but Type (graphic A or B) of the "first" graphic in the same sequences is tied to a checkbox. And the usage of graphic B triggers an offset to the user input (from the ExtendScript panel) while A does not and so on. But I guess I have to realize the checkbox with a onClick Event in the new panel and calculate the offset from there solely in ExtendScript.

 

Hope it's understandable 😉