Closed envex closed 10 years ago
@envex a couple of clarifying questions:
executeAction
code? In the extendscript engine? How are you triggering it?@joelrbrandt for sure!
In my setup I avoided this integration problem by making my Generator plugin start normally with Photoshop (this is how plugins are intended to be used, right?) and I created socket.io server in node which I can then connect to in my html extension, so I can have fully custom "frontend" for my generator plugin. I just tend to avoid ExtendScript as much as possible when there are more elegant ways just in JavaScript.
Btw: recently released beta of Render.ly generator plugin went with totally same aproach of html panel communication—they use socket.io server too for that.
@marekhrabe That sounds amazing -- do you have a example of the how socket.io connects to the extension?
@envex I made a gist for you with some code that should give you right direction. Consider it a pseudo-code, I haven't run that actually, but the concept is exactly the same as in my app.
@marekhrabe Thanks!
@envex You're welcome, let me know when you build something :) btw: you should close the issue as the problem is not related to generator-core
I am having the same problem as the op.
I can see from the generator architecture documentation why this is happening as photoshop creates a new menu section for each KVLR connection but i cant figure out the name of the section that photoshop assigns to my external generator-core.
I really need this functionality in my plugin and need it during development so any help would be greatly appreciated.
@umarniz Unfortunately, what you're looking for simply isn't possible. The "generateAssets" action that can be executed from extendscript only targets the built-in generator (and is intended to only be used for the asset generation feature). Given the intent of the feature, this is unlikely to be fixed.
I'd highly recommend going the route that @envex and @marekhrabe discussed above. In fact, the websocket server infrastructure has now been added directly to generator-core. See Generator.prototype.startWebsocketServer
:
https://github.com/adobe-photoshop/generator-core/blob/master/lib/generator.js#L1832
For an example of how to use the Websocket server in Generator (both from the plugin side and as a client), see this repo (especially the README): https://github.com/adobe-photoshop/generator-connection
Let us know if you experience any problems!
cc @iwehrman
@joelrbrandt thank you for such a prompt response. I will work around the problem then.
I'll keep bumping you on issues I come across, cheers!
When running generator-core from the command line to develop a plugin, I'm unable to target the plugin's menu from the generate menu when using the provided sample code.
However, if I take my plugin and add it to the photoshop plugins/generator folder, it works like a charm.
Is it possible to target menu items that are started from the command-line?