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

Can CEP PPro Panel Listen for Events Such as onSourceClipSelectedInProjectPanel

Explorer ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

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!

TOPICS
SDK

Views

482

Translate

Translate

Report

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 , Dec 05, 2022 Dec 05, 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

Votes

Translate

Translate
Adobe Employee ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

'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/PPR...

Votes

Translate

Translate

Report

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
Explorer ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

LATEST

Works perfectly, thank you @Bruce Bullis !

Votes

Translate

Translate

Report

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