Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to export top-level groups (folders) #28

Closed
wants to merge 2 commits into from

Conversation

jschaf
Copy link
Contributor

@jschaf jschaf commented Nov 5, 2014

This pull-request adds the ability to export all your top-level groups (folders, or layerSets)

The default option is still to export individual layers, but you can toggle the behavior in the dialog.

There's a decent amount of copy-paste from exportLayers. I didn't attempt to refactor the exportLayers to support this feature. I just copied the code in exportLayers and modified it to work.

And I don't really understand how the background images fit into this, so I just commented that part out.

@skjorn
Copy link
Collaborator

skjorn commented Nov 5, 2014

Hi, thank you for your effort! I really appreciate that you're trying to contribute. However, I cannot accept your pull request for 2 reasons:

  1. You just export the groups and ignore top-level layers. That will give people a bad idea to group single layers into groups. (Besides being incompatible with some of the existing features.)
  2. app.activeDocument.layerSets[i] is actually very slow. It's fine when you have only 10 groups, but then you can merge them manually before export. The needed information is already collected; it doesn't have to be this slow.

If you care enough to fix these issues, I think we could add this as a temporary solution until something better comes up (like selective merging even of nested groups and possibly integrating it into one routine).

It shouldn't be a big deal, really. You just need to work with "groups" and "layers" or "visibleLayers" collections (see main()). They contain wrapper objects for actual sets and layers (look them up in the file; there's only one place they're set with all their properties). Groups are organised in a tree, layers are a flat list. You just need to pick top-level layers and merge in top-level groups and work with the wrapper objects. I just don't have time for it right now.

@skjorn skjorn closed this Nov 5, 2014
@jschaf
Copy link
Contributor Author

jschaf commented Nov 6, 2014

Okay, I didn't quite understand how everything fit together. Thanks for the explanation. I'll send a general clean-up pull request to get familiar with the code base and then build from there.

@skjorn
Copy link
Collaborator

skjorn commented Nov 6, 2014

Sure, feel free to ask. I wrote most of the code.

@paazmaya
Copy link

@jschaf Any updates on this?

@jschaf
Copy link
Contributor Author

jschaf commented Jan 23, 2015

No updates :( My use case away so I don't use Photoshop to export layers.

On Thu, Jan 22, 2015 at 6:18 AM, Juga Paazmaya [email protected]
wrote:

@jschaf https://github.com/jschaf Any updates on this?


Reply to this email directly or view it on GitHub
https://github.com/hsw107/Photoshop-Export-Layers-as-Images/pull/28#issuecomment-71006014
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants