Copy link to clipboard
Copied
Hi we are writing a CEP panel, mostly intended to be used in After Effects. We needed a modal dialog in our experience so we have a second extension panel which is a ModalDialog, and we use requestOpenExtension to open it. This all works, however the performance is not great. The entire After Effects application is non-responsive for many seconds while the modal dialog panel loads. In Windows / Process Explorer I can see After Effects is creating two new processes CEPHtmlEngine.exe, which presumably run Chromium and all the dependencies. But this happens every time we just want to show a modal dialog (and close it).
Upon investigation I see some products support an extension "persistent mode" (https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_9.x/Documentation/CEP%209.0%20HTML%20Exte...). I am guessing this is so the panel (modal dialog) is not unloaded and can be preloaded when hidden. I could be wrong. But documentaiton says how to do this for Photoshop, Indesign, and Incopy. Is this supported in After Effects? If so, how?
If not, are there any options for my experience? The performance to show a modal dialog is just terrible right now...
Thanks
1 Correct answer
AFAIK, AfterEffects doesn't support persistent. However, You can make a modal dialog with ScriptUI.
Copy link to clipboard
Copied
AFAIK, AfterEffects doesn't support persistent. However, You can make a modal dialog with ScriptUI.
Copy link to clipboard
Copied
Thanks so much for the reference to ScriptUI. I investigated it and implemented our modal as a ScriptUI and it is very fast and provides sufficient UI for us. However a problem with ScriptUI is that there doesn't seem to be a way to asynchronously push data to a created window. For example:
1) Perform external resource request to get data (in main Chromium environment)
2) Show window (modal) to provide responsive UI (run JSX function via evalScript)
3) External resource request completes (in main Chromium environment)
4) Send data to window (run JSX function via evalScript)
5) JSX updates window layout to reflect new data
The problem is the 2nd evalScript in step #4 is never called until the window is closed and the callback from the first evalScript in step #2 is completed. This means I have no way to asynchronously send data to the JSX environment (using CSInterface's evalScript).
My main panel must be using Chromium because I am using oauth and stuff.
Is there any way to send events to a JSX ScriptUI window from Chromium while it is open -- so that I can send data to it?
Thanks
Copy link to clipboard
Copied
In this case, You can use plugplugInterface.
Below link is my sample extension, Probably, you can refer it.
https://github.com/ten-A/CreativeSuiteSDK_Experimentals/tree/master/net.sytes.chuwa.callbacktest
Copy link to clipboard
Copied
I was afraid plugplug wouldn't work in After Effects, but it appears it does. Thanks!

