Copy link to clipboard
Copied
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...
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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) ?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
thanks
Copy link to clipboard
Copied
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....
Copy link to clipboard
Copied
C++ plug-ins and CEP panels can communicate using Vulcan (CSXS Events).
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Is there an official Vulcan implementation in c++ sdk ?
I am told the Illustrator C++ SDK contains relevant sample code.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Sorry, my AE-specific CEP knowledge is...negligible. Will ask for AE team comment...
Copy link to clipboard
Copied
Thanks, I appreciate you taking the time 🙂 Any insight anyone can offer is welcome!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now