Copy link to clipboard
Copied
I am building a "Properties Panel" plugin, which would be a panel that displays property info about the selected layer, also enabling the user to adjust these values directly from the panel.
I've been reading here in the forums and it seems the recommended method of doing anything with panels is the CEP/ScriptUI route. However, I will need AEGP functionality, so how do I get the AEGP and the CEP/ScriptUI to talk to one another?
For example, I will need the AEGP to listen for layer selection events, which is not possible with CEP/ScriptUI. Upon layer selection, the panel should populate with UI elements corresponding to layer properties (much like the Effects Control Panel, but for layer properties).
I know AEGPs can execute scripts, but can they can actually pass information back and forth (or even in just one direction)?
Any advice at all would be greatly appreciated.
Thanks,
Tom
Hi Tom.
before trying to use an AEGP for selection functionalities, you can use
"comp.selectedLayers" and "comp.selectedProperties" from javascript.
you can also use a scheduled task on javascript to check the selection on
intervals, thus detecting if there was a selection change.
if you still think you must have an AEGP, then you can use idle_hook for
the same purpose of checking stuff periodically, and then use
AEGP_ExecuteScript() to send data to your panel.
you can also use AEGP_ExecuteScript() to r
...Copy link to clipboard
Copied
Hi Tom.
before trying to use an AEGP for selection functionalities, you can use
"comp.selectedLayers" and "comp.selectedProperties" from javascript.
you can also use a scheduled task on javascript to check the selection on
intervals, thus detecting if there was a selection change.
if you still think you must have an AEGP, then you can use idle_hook for
the same purpose of checking stuff periodically, and then use
AEGP_ExecuteScript() to send data to your panel.
you can also use AEGP_ExecuteScript() to retreive data from the javascript
side via the returned value.
if you need some deeper integration between the javascript panel and an
AEGP, there's some javascript SDK that allows you to build an AEGP which
gets called to execute custom javascript APIs.
but i doubt there's really a need for that according to what you describe.
Copy link to clipboard
Copied
hi shachar. Perfect. Thanks.
The panel should update with additional UI elements if new properties/streams are added to the layer (even if those properties are not selected). I was looking at the example AEGP "Streamie" to learn more about detecting/reading streams. Would you still suggest scripts for this behavior?
Is the javascript scheduled task much more resource intensive than idle_hook?
I thought I saw somewhere that selecting a layer does in fact send a command/event that can be listened to without idle_hook -- can you confirm that it's not possible?
I really appreciate your help. Very informative.
Copy link to clipboard
Copied
i never compared the shceduled task vs idle hook in terms of performance
toll. by intuition, i'd say idle hook is less taxing.
for AEGP's there's the update menu hook, which i think AE calls when
selections change. i'm not sure whether the hook gets called when the
selection changes or only when the relevant menu gets exposed.
you'll just have to check...
Copy link to clipboard
Copied
https://forums.adobe.com/people/shachar+carmi wrote
if you need some deeper integration between the javascript panel and an
AEGP, there's some javascript SDK that allows you to build an AEGP which
gets called to execute custom javascript APIs.
Hi shachar carmi​, could you tell me where I can find any documentation on this?
Copy link to clipboard
Copied
go to where the adobe extendscript tool is installed on your machine. in
there you'll find an "SDK" folder in which there's a "cpp" folder
containing sample scripts and cpp projects for win and mac.
in "JavaScript Tools Guide CS6.pdf" you can find the basic info on how to
use that API.
(chapter 7, Integrating External Libraries)
Copy link to clipboard
Copied
Thanks!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more