Skip to main content
Participant
May 3, 2016
Answered

Exporting Layer Comps?

  • May 3, 2016
  • 1 reply
  • 3024 views

Hi,

I'm quite new to Photoshop plugin development, so this question might have an obvious answer, however I've been reading the SDK docs and googling around for two days without any results so I came here for help.

I'm trying to create an export plugin that exports a number of Layer Comps from a document (filtered by their names) as png files. After reading through the docs I'm left wondering if this is at all possible. The exporter example plugin in the SDK exports the current state of the document as raw data, but I've seen no indication that exporter plugins can apply or enumerate layer comps or otherwise manipulate the document state. Based on my current knowledge this would probably be possible with an automation plugin, but I don't have a good enough grasp on how those function to start experimenting with them yet.

So my questions are:

  • Is it possible to use an export plugin to export several different Layer Comps? (Basically the same as the 'Layer Comps to Files' script) We'd prefer a c++ plugin for this as we'll need the plugin to interface with our current systems for which the libraries are written in c++
  • If so, how would I go about doing this? The SDK documentation is pretty vague on this point.
  • If not, would it be possible to do this by involving an automation plugin and if yes, how?
  • If none of the above are possible, what do you suggest?

Thanks,

Barna Buza

This topic has been closed for replies.
Correct answer Tom Ruark

You will need a combination of an automation plug-in and/or an export or file format plug-in. If it is the same as layer comps to files then it shouldn't take much work to convert the "automation" part of the JSX file into C/C++ "automation" code. For the things in the JSX script that are part of the DOM you will need to use the Listener and Getter to find the equivalent ActionDescriptor/ActionReference/ActionList code to use in your automation plug-in.

Another option would be to get the ExtendScript engine in your C++ automation plug-in and just run the JavaScript code.

It all depends on how much control you want.

1 reply

Tom Ruark
Tom RuarkCorrect answer
Inspiring
May 12, 2016

You will need a combination of an automation plug-in and/or an export or file format plug-in. If it is the same as layer comps to files then it shouldn't take much work to convert the "automation" part of the JSX file into C/C++ "automation" code. For the things in the JSX script that are part of the DOM you will need to use the Listener and Getter to find the equivalent ActionDescriptor/ActionReference/ActionList code to use in your automation plug-in.

Another option would be to get the ExtendScript engine in your C++ automation plug-in and just run the JavaScript code.

It all depends on how much control you want.

BoyCAuthor
Participant
May 13, 2016

That's the conclusion I arrived at as well. Thanks for the confirmation.