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

Hybrid plugin - where is PlugPlug

New Here ,
Aug 24, 2015 Aug 24, 2015

I am guessing Adobe is pushing towards using HTML5 instead of native OS-dependant code, which would be fine if the tools wouldn't be so awkward, but whatever.

If I am to use HTML5, where exactly is PlugPlug? It's mentioned all over the place, yet seems to be accessible nowhere.

I need to communicate between the HTML5 UI and my C++ plugin.

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
New Here ,
May 26, 2019 May 26, 2019

I have the same question. There is the FreeGrid example in the Illustrator SDK which uses the PlugPlug library, but the header files used there seem Illustrator specific. Can anyone help?

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 ,
May 26, 2019 May 26, 2019

PlugPlug is included with the install of Adobe Apps, you can require it in Extendscript like so:

            try {

                var xLib = new ExternalObject("lib:\PlugPlugExternalObject");

            } catch (e) {

                alert(e);

            }

            if (xLib) {

                var eventObj = new CSXSEvent();

                eventObj.type = 'myType';

                eventObj.data = 'myData';

                eventObj.dispatch();

            }

I know you can also write your own ExternalObject libraries and access them the same way, but I haven't had a chance to look into that yet. bbb_999​ would know where to find examples on that.

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 ,
May 26, 2019 May 26, 2019

The OP's and my question does not relate to ExtendScript, but how to send CSXSEvents from a Plugin, e.g. an AEGP, to a HTML5 Panel provided by a CEP. In the Illustrator SDK we can find an example, FreeGrid, that does just that for an Illustrator plugin written in C++. But this cannot be transfered to After Effects, as the headers provided with the Illustrator SDK rely on Illustrator specific types and classes.

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 27, 2019 May 27, 2019

After a lot of research there is no way in AE sdk (for now..). is right, the only way is to execute script from plugin to call CEP and to sendData. (with AEGP_executescript)

To catch data from cep to plugin I cheated creating an invisble checkbox called by CEP with global variable. If someone has a proper solution...

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 ,
May 27, 2019 May 27, 2019

zankol40675219​ Got it, was just explaining how PlugPlug works. I'm not familiar with FreeGrid, but since PlugPlug exists (triggering a CSXSEvent from Extendscript through C++ to CEP) seems like there's gotta be a way to do this straight from C++ to CEP. I haven't found a solution yet but have been meaning to research it when I have some time. Basically, we need a simplified version of PlugPlug that skips the Extendscript step...

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 ,
May 27, 2019 May 27, 2019

Thanks for your answers.

It has been suggested in other threads to use ExtendObject in the CEP js-code to load an AEGP and call it's functions. With this you could sort of communicate between the CEP and your plugin. But to me that seems strange, as the AEGP would need proper loading, pointers to handles etc. that the Host application prodivides and I don't think ExtendObject could do that. But maybe I'm mistaken. Has anyone tried this yet?

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 28, 2019 May 28, 2019

I am guessing Adobe is pushing towards using HTML5 instead of native OS-dependant code...

From where do you perceive any such 'push'? Different APIs are available, to deal with different parts of the application's object model(s).

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 ,
May 28, 2019 May 28, 2019

bbb_999 I don't see how that is relevant here. Instead, could you say something about the questions at hand?

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 28, 2019 May 28, 2019

I don't see how that is relevant here.

See first line, of original post.

Instead, could you say something about the questions at hand?

Justin is right.

Here's an example of a PPro panel's ExtendScript sending a message, and that same panel's JavaScript responding to the message. I'm told the Illustrator C++ SDK contains similar message-listening 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
Community Expert ,
May 28, 2019 May 28, 2019

bbb_999​ thanks, are there any examples of how to build your own C++ library that works like PlugPlug or AdobeXMPScript with your own custom C++ functions you can then call from ExtendScript? I didn't see anything in the AE SDK, but not sure if I'm missing something.

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 28, 2019 May 28, 2019

I'll have a look at the Illustrator C++ SDK, time permitting. The referenced snippet of CSXS-sending ExtendScript code, works in AE too.

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 ,
May 28, 2019 May 28, 2019

bbb_999​ I think I found a reference to the ExternalObject example here​ but I'm not sure what directory "sdkInstall/sdksamples/cpp/" in the Adobe ExtendScript SDK is referring to (or if it exists anymore). Any ideas where that might be? 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
Adobe Employee ,
May 28, 2019 May 28, 2019

I think they mean the /sdk directory, adjacent to ExtendScript Toolkit.

dir.png

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 ,
May 28, 2019 May 28, 2019

Awesome thanks Bruce! Gonna start checking this out... If anyone is on Windows, the directory is:

C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\SDK\Samples\cpp\build\basicexternalobject\win

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 ,
May 28, 2019 May 28, 2019

bbb_999​ I got the BasicExternalObject and SampleLib examples compiled in the AE library directory, however when trying to access it in Extendscript (on AE 16.1.1), I keep getting an I/O Errors on both libraries. Any ideas what would cause this? I think they were designed for Bridge, so do I need to customize/target the build for AE aside from building in the correct folder?

try {

    var yLib = new ExternalObject("lib:\BasicExternalObject");

    alert(yLib);

} catch (e) {

    alert(e);

}

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 28, 2019 May 28, 2019

Any ideas what would cause this?

"Whereof one cannot speak, thereof one must be silent."
    

             - Wittgenstein

I'll find a better-informed assessment.

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 ,
May 29, 2019 May 29, 2019

@bbb_999 What you are writing is unhelpful. The issue is how to communcate between CEP and Plugins written in C++ using CXSX events, i.e. how to listen to them and dispatch them from within the plugin. Please read what crazylafo​ and I have written above.

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 29, 2019 May 29, 2019

What you are writing is unhelpful.

Did you investigate the Illustrator SDK, as I suggested? The DrawArt / DrawArt UI samples demonstrate plug-in / panel communication.

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 ,
May 29, 2019 May 29, 2019

The examples in the Illustrator SDK depend on plugplug-headers that are specific to Illustrator and the Illustrator SDK, as I mentioned above. That's the problem.

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 ,
May 29, 2019 May 29, 2019

bbb_999​ Would you guys ever consider releasing the source code for PlugPlug or a simplified version of PlugPlug? This would provide us with a working ExternalObject example for multiple apps and give insight into accessing CEP from the C++ SDK.

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 29, 2019 May 29, 2019
Would you guys ever consider releasing the source code for PlugPlug or a simplified version of PlugPlug?

It's within the realm of possibility, though different products would likely prioritize that work differently.

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 ,
Jul 16, 2019 Jul 16, 2019

I'm not sure about this, but I just checked SDKPlugPlug.cpp / .h (which appears to be a simple wrapper that loads PlugPlugOwl.framework / .dll and exposes a couple methods) in AI SDK and it looks like it only depends on AIFoldersSuite from AI SDK. This dependency can be probably removed as it is used only to construct a path to PlugPlugOwl.framework/.dll, which can be easily done without this suite. Bruce Bullis​, do you think that PlugPlug.framework / .dll in AE / Pr could be loaded and used the same way as PlugPlugOwl in AI SDK example? I don't know whether it's the same lib but it looks like it contains all the methods that SDKPlugPlug requires (PlugPlugLoadExtension, PlugPlugUnloadExtension, PlugPlugAddEventListener, PlugPlugRemoveEventListener, PlugPlugDispatchEvent) but I don't have a clue what happens under the hood and whether it's safe to use it this way. 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
Adobe Employee ,
Jul 16, 2019 Jul 16, 2019
LATEST

Bruce Bullis, do you think that...

I have no informed opinion on that, but it sounds worth trying.

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