Skip to main content
Inspiring
December 5, 2022
Answered

Can CEP PPro Panel Listen for Events Such as onSourceClipSelectedInProjectPanel

  • December 5, 2022
  • 1 reply
  • 1263 views

Hello,

 

I know event listeners have been discussed many times here, and I am able to listen for certain Premiere events in my custom Premiere Pro panel with this Javascript:

var cs = new CSInterface();
cs.addEventListener('com.adobe.csxs.events.ApplicationActivate', function () { 
  console.log('Premiere Activated!')
});

 

And I am able to have my ExtendScript listen for certain Premeiere Pro events within the ExtendScript like this:

app.bind('onSourceClipSelectedInProjectPanel', $._PPP_.doSomething);

 

But I am unable to get the JavaScript layer to listen for 'onSourceClipSelectedInProjectPanel', and the sample panel on GitHub only demonstrates how to send messages to Premiere's built-in event panel, which is not particularly useful in my case.

 

Is it even possible to listen for 'onSourceClipSelectedInProjectPanel' or the other events demonstrated in the sample planel, such as 'onActiveSequenceSelectionChanged', etc? 

 

That's what I'd like to do, since my panel displays certain 'suggestions' based on the state of the panel, the state of premiere (usually just the selection in the project window and the active sequence), and pre-fetched data from our ticketing system.  Refreshing with a button is too cumbersome since I'd like the user to be able to click through the project window and see the suggestion without having to refocus the custom panel.

 

Or is there some other way to immediately send a message from the ExtendScript layer to the JavaScript layer without the JavaScript layer requesting it (currently I have all data returned via callbacks)?

 

Thank you!

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

'onSourceClipSelectedInProjectPanel' messaging happens within PPro's ExtendScript layer; you would need to create any additional communication you wanted, between your panel's ExtendScript listener function, and your panel's JavaScript layer. 

PProPanel shows how to, from within an ExtendScript listener function, send a Vulcan message, for which PProPanel's own JavaScript layer is listening: 

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

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
December 5, 2022

'onSourceClipSelectedInProjectPanel' messaging happens within PPro's ExtendScript layer; you would need to create any additional communication you wanted, between your panel's ExtendScript listener function, and your panel's JavaScript layer. 

PProPanel shows how to, from within an ExtendScript listener function, send a Vulcan message, for which PProPanel's own JavaScript layer is listening: 

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

Jason_K_Author
Inspiring
December 6, 2022

Works perfectly, thank you @Bruce Bullis !