Skip to main content
Known Participant
August 28, 2022

Opening a ModalDialog in a CEP bundle in After-Effects breaks JSX scope since version 22.6.0

  • August 28, 2022
  • 2 replies
  • 266 views

Hey all

 

Since After Effects version 22.6.0 (on Mac M1, at least), programmatically opening a ModalDialog extension from a "sibling" extension (both under the same ExtensionBundle CSXS/Manifest) now breaks the scope.

 

assuming my jsx file has this line:

var hello = "world";

 

then on After Effects up until version 22.6 I could do in Javascript:

var test1 = await evalScript("hello");
console.log("test1:" + test1);
await openModalPanel();
var test2 = await evalScript("hello");
console.log("test2:" + test2);

I would get:

test1: world

test2: world

where of course evalScript and openModalPanel are my custom async functions (code not shown) that evaluate JSX (using CSInterface.evalScript) and open a bundled ModalDialog extension and wait for it to open before resolving (by the use of CSInterface.requestOpenExtension and messaging to determin that it had opened).

 

Same exact code as above on After Effects version 22.6.0 gives:

test1: world

test2: EvalScript error.

 

meanig that scope is no longer available once the ModalDialog has been opened.
BTW, changing the second extension's Type in the manifest file to something like Modeless does not block scope (meaning, I get the desired outcome).

 

Is this a bug or a feature of AE 22.6.0?

 

(background: we have our main extension as a Modeless extension and while processing (when user clicks "process"), would like to present a ModalDialog to prevent the user from interacting with the host app, After Effects, while the main extension is "doing it's thing". This workex perfectly on After Effects up to version 22.6.0, and is now broken)

 

thnx,

Sa'ar

This topic has been closed for replies.

2 replies

JohnColombo17100380
Community Manager
Community Manager
October 18, 2022

Hi @Saariko2 ,

This issue has been fixed in After Effects 2023 (version 23.0) which is now available in the Creative Cloud app.

 

Thanks again for reporting this issue,

- John, After Effects Engineering Team

JohnColombo17100380
Community Manager
Community Manager
September 26, 2022

Hi @Saariko2,

Thank you for making reporting this issue. This was a bug in After Effects 22.6, not a feature. In the latest Beta builds, there is a fix available for this issue and that same fix will ship with a future version of After Effects ( pending testing by both us and by users of the Beta ). If you can, please install the Beta build of After Effects, try this same CEP workflow there, and let us know if you encounter the same issue or not. In our testing with the CEP Sample panel, we are able to again run scripts from a modal CEP panel after the fix.

 

Thanks for reporting this issue and for any further information you can provide, 

- John, After Effects Engineering Team