2

I am looking for a script/way to automatically render all Ps groups in a project into their own single .png file (so one .png per Ps group).

I have found scripts that export all layers as .png but that's not useful. Also having to go in and select the layer groups that I want is a bit annoying because I will always want one PNG of every group.

Anyone that can help?

ps: I have a script that exports all layers into a .png, so having a script that automatically merges groups into one layer would do aswel!

Thank you!

4
  • I'm not sure of the exact context of the project but have you looked into artboards yet? Might come in handy in future projects.
    – Summer
    Aug 23, 2016 at 15:29
  • Context: if an artist creates a scenery with a lightpost and a bench, he/she will make a group for the lightpost, containing a lamp, some decorations and the post. He/she will then also make a group for the bench, with grass, the seating and so on. I need the bench and lamp as a whole but separate from one another.
    – Maximvds
    Aug 23, 2016 at 15:33
  • What about the Assets Generator that is built in PS CC? More info
    – Joonas
    Aug 24, 2016 at 7:06
  • I have tried that as well but the included sizing settings and default settings don't work, it never renders out in the resolution I ask/set it to, so 'quick export', 'export as' & 'Assets generator' don't work
    – Maximvds
    Aug 24, 2016 at 10:23

3 Answers 3

1

Photoshop’s Generator can do this. There’s two steps needed.

  1. Rename your groups to include .png as a suffix.
  2. Turn on FileGenerateImage Assets.

Here’s a file I have set up to generate PNGs based on groups. Note that bitmap masks or vector masks on the groups can be used to control the exported image size and cropping.

Generator in Photoshop, used in the Bjango app icon templates

Turning on FileGenerateImage Assets creates a folder next to your PSD with all the assets.

Generated files in the Finder

Here’s some example documents with Generator set up for exporting, if you’d like to see it in action. Generator can do even more, using additional info in the layer or group name (for image size, exporting multiple formats etc).

0

I don't believe Photoshop has an automated way of exporting many different specific layer groupings (like identifying, separating, and exporting different individual "lamp" and "bench" folders as separate PNG's). Try going to the parent-most folder of "lamp", for example, right clicking the layer and selecting "quick export as PNG". This should only export the contents of that folder. Important to note that "quick export to PNG" has trouble detecting layers in extensively deep folder groupings sometimes. If you're having trouble try right clicking the folder and choosing "export as" instead then selecting PNG.

1
  • 1
    Hi, after a little testing and small adaption of the workflow, we found a way that works with the 'export as' option. The only thing I'm still looking for now is a better automated naming convention to not end up with a hunderd .png's called 'L1' or 'Tree'
    – Maximvds
    Aug 24, 2016 at 7:56
0

Layer compositions are designed to work in the way you want to. Creating multiple versions of a design. For the same purpose Photoshop is equipped with a script for exporting those. Just go to File > scripts > layers comps to files

If you have a file where groups are used instead of layer compositions use a script for changing those to comps http://elevatexd.com/blog/photoshop-scripts-and-extensions-to-improve-your-workflow

2
  • I don't have that option in my scripts, could you tell me which scripts you have installed please?
    – Maximvds
    Aug 24, 2016 at 7:54
  • Don't just add a one-line answer, provide some explanation. Also this works for Layer Comps, not Layer Groups (or does it? please provide more info).
    – Luciano
    Aug 24, 2016 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.