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

call CEP from plugin

Explorer ,
Mar 14, 2019 Mar 14, 2019

Hi,

I've a double question about the cep thread communication from a plugin, I didn't find answer in previous threads.

firstly , is there a solution to embbed some CEP in a plugin ?

secondly, I made an experiment using AEGP_ExecuteScript(). the plugin call it when a button is pressed. (in UserchangedParam thread)

I tried to use some json inside the script. The json lib is present in cep but not in classical extendscript. And it works. If the json file has an error, the after effect script debuger show  the CEP script with the error. (I don't use external library in script side).

but sometimes  I randomly  get a script error  : AE  doesn't know the JSON class functions. It seems in this case that  it  does'n't access to the CEP lib but only the classical extendscript...

TOPICS
SDK
3.2K
Translate
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

Community Expert , Mar 14, 2019 Mar 14, 2019

as far as i know, you can't make AE load a CEP unless it's in one of the

designated CEP folders. i can think of 2 partial solutions:

1. place a shortcut in the CEP folder to your effect's folder. that way

(maybe) you can have your code placed somewhere else.

2. create an empty CEP that when loaded calls AE with a function you

define, such as "FetchPanelCode()". that function returns a string with the

HTML code that the panel can then evaluate.

Translate
Community Expert ,
Mar 14, 2019 Mar 14, 2019

a JSON and a string representing an array or dictionary are very similar,

but not exactly the same. there's a free library out there that defines the

JSON standard for use in extendscript. it allows you to do

JSON.stringify(), for instance.

why does your script sometimes work? maybe there's another script on your

system that defines the JSON standard, and once defined it's available for

all scripts.

Translate
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 ,
Mar 14, 2019 Mar 14, 2019

I sow this JSON-js/json2.js at master · douglascrockford/JSON-js · GitHub  and I think I have to add it in the script part.

It's a bit strage, the script was tested on different systems, mac or windows. If I get the error 'JSON is undefined' and restart after effect, it works well again...

But last question : is there a proper solution to call the cep engine  and to put a dialog window/ui  written in html/js  inside  a plugin  (not to put it in extension)  ?

Translate
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
Community Expert ,
Mar 14, 2019 Mar 14, 2019

as far as i know, you can't make AE load a CEP unless it's in one of the

designated CEP folders. i can think of 2 partial solutions:

1. place a shortcut in the CEP folder to your effect's folder. that way

(maybe) you can have your code placed somewhere else.

2. create an empty CEP that when loaded calls AE with a function you

define, such as "FetchPanelCode()". that function returns a string with the

HTML code that the panel can then evaluate.

Translate
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 ,
Mar 14, 2019 Mar 14, 2019

thanks

Translate
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 ,
Apr 25, 2019 Apr 25, 2019

After some deep looking in documentation and exemples I still have problems with html<-->c++ communications in AE.

-From plugin to cep I "cheated" using script find menucommandid() and executeCommand(). But is there a proper way to call a cep from a plugin ?

-from cep to plugin how to send properly data using events and how to catch them in the plugin part ?

I sow a exemple un redgiant coloristaIV. but it s commercial and so protected.  in this exemple each modifications in the cep GUI apply the values in live to the plugin effect, including in ARB data....

Translate
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
Adobe Employee ,
May 13, 2019 May 13, 2019

C++ plug-ins and CEP panels can communicate using Vulcan (CSXS Events).

Translate
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 ,
May 13, 2019 May 13, 2019

Is there an official  Vulcan implementation in c++ sdk ?

For now I found a solution with the jsx script using aegp_executescript. The script call Vulcan to dispatch event  from plugin to plugin.

From cep to plugin I use an invisible checkbox in plugin part to catch  message from cep. It s homemade but it works.

Translate
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
Adobe Employee ,
May 13, 2019 May 13, 2019

Is there an official  Vulcan implementation in c++ sdk ?

I am told the Illustrator C++ SDK contains relevant sample code.

Translate
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
New Here ,
Sep 26, 2022 Sep 26, 2022

Hey @Bruce Bullis!

 

Sorry to resurrect this long-dormant thread, but I'm a bit stuck on this myself.

 

Having gone through the Illustrator C++ SDK, it appears that the sample code for the ScriptMessage plugin, in order to communicate between C++ plugins and CEP panels is using PlugPlug, which I thought was only available to Premiere, Illustrator, Photoshop, and InDesign, not After Effects?

 

The SDKPlugPlug.h file from the AI SDK includes a few Illustrator-specific header files, so it seems to me that I would need an AE-specific PlugPlug file, which doesn't seem to exist, which would make sense if PlugPlug is only for the aformentioned platforms...

 

I feel like I am missing something. I feel like I've looked high and low, and can't figure out how to emit custom CSXSEvents within AE. Is there a different sample that I should be looking at instead?

 

Thanks for your time,

Patrick

 

Translate
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
Adobe Employee ,
Sep 26, 2022 Sep 26, 2022

Sorry, my AE-specific CEP knowledge is...negligible. Will ask for AE team comment...

Translate
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
New Here ,
Sep 27, 2022 Sep 27, 2022
LATEST

Thanks, I appreciate you taking the time 🙂 Any insight anyone can offer is welcome!

Translate
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