Adobe-CEP / Samples

Code samples for CEP extensions
MIT License
972 stars 551 forks source link

PPro: Callback or Events for Opening, Closing Project #102

Closed manofspirit closed 5 years ago

manofspirit commented 5 years ago

Hi there,

Is there's a way to attach event in JSX to PPro's event ? For example when the user import a file, is there a way to get a callback called ?

Thanks.

bbb999 commented 5 years ago

Yes; search PProPanel for 'onItemAddedToProject', to see an example implementation.

https://github.com/Adobe-CEP/Samples/blob/1b445e7cc7acb26e9ef358c45d8175ae42674107/PProPanel/jsx/PPRO/Premiere.jsx#L1876

manofspirit commented 5 years ago

@bbb999 My current issue is that the function is triggered in background once the panel was shown at least once in PPro. But if we don't launch the panel the function is never called. How should we solve this?

bbb999 commented 5 years ago

You can use an invisible panel, to forcibly open another (visible) panel.

https://github.com/Adobe-CEP/CEP-Resources/tree/master/CEP_9.x/Samples/CEP_HTML_Invisible_Extension-9.0