Mobile app version of vmapp.org
Login or Join
Dunderdale640

: Script that export photoshop layer groups to PNG files? I need some help here :( I want to know if it is possible to have a script export my layer groups as individual PNG files? Let say

@Dunderdale640

Posted in: #AdobePhotoshop

I need some help here :(
I want to know if it is possible to have a script export my layer groups as individual PNG files?

Let say im creating a texture map for a rock, so I save the photoshop document as Rock.psd

Now I want to export each texture group as the photoshop document name with an prefix for each layer group.

Example:
Albedo layer group as Rock_AM.png
Diffuse layer group as Rock_CM.png
Specular layer group as Rock_SM.png
Roughness layer group as Rock_RM.png
Gloss layer group as Rock_GM.png
Metalness layer group as Rock_MM.png
Displacement layer group as Rock_DM.png
Normal layer group as Rock_NM.png
Self Illumination layer group as Rock_IM.png

Can that be possible?
But if a layer group is empty I will like the layer group to be ignored.
I want only export the layer groups that has layers inside.



Any help or guide please?

Thx,
Alex

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale640

3 Comments

Sorted by latest first Latest Oldest Best

 

@Si6392903

I would use Comps for this. If you have the different versions you want already separated into groups/folders in Photoshop, all you have to do is create Comps of them. It's a couple of extra steps, but the automation that follows is worth it. In my situation I had multiple layers contained within each group/folder & this is what I did. This also assumes you've already given each group/folder an unique name:

Open both the Layers and Layer Comps panels. Double click on the first layer's name and Ctrl + C to copy it. Over in the comps panel, click the Create New Layer Comp icon (bottom of panel). Name the new comp the same as your first group. Continue that for all remaining groups. Then choose File > Export > Layer Comps to Files. You will get a dialog where you can copy/paste the path from the Windows Explorer path to the folder where you want the exported files to go or browse to it and give the files a common prefix name. The suffix will be the comp layer name. Then hit run.

I would like to see a script for just exporting the groups but there does not appear to be one built in, yet.

10% popularity Vote Up Vote Down


 

@Radia289

This couldn't be easier, in Photoshop CC at least.


Select a layer group (or multiple layer groups).
Right click --> 'Export as' (or Quick Export as PNG)
Set the options and save location

10% popularity Vote Up Vote Down


 

@Sims5801359

If you are using CS6 or older try this: www.peruho.com/web-design/export-your-assets-using-cut-and-slice-me/ It'll give you the options that photoshop cc gives you automatically (name a layer .png and then export it as such)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme