Photoshop Batch Script for Exporting Layers with a Master Backround

I have 100 layers that I want to export with a specific master layer as the background.

Any JSX scripts out there for CS6?

thanks!

Answer

An Action can be recorded to do this. It’s a bit of a trick, but works.

First, Duplicate the document, and select the top layer.

This is going to be the starting point.

… then assuming you know how to record an action, record it doing the following:

  1. Duplicate Document
  2. Layer > Arrange > Send to Back
  3. Layer > Merge Down
  4. Select > All Layers
  5. Layer > Delete > Layers
  6. Export as you like
  7. Close without Saving
  8. Layer > Delete > Layer

What this does:

Creates a copy of your current document with the top layer selected, then pushes it all the way down to the bottom, just above the background Layer.

Then it merges this selected Layer with the background, then (the tricky part) exploits a slight anomaly in Photoshop layer selection when Selecting all Layers the background is NOT selected, so the next step deletes all the unneeded layers for this export.

Then it exports as you wish.

Then dispose of this “working” file.

Which automatically returns you to the starting point file, with the top layer currently selected. Which it then deletes, leaving you with the next layer selected as this is the new starting point.

Now you can either tap to play this Action 100x, or record another action that does only one things, play this Action, and then play that until it gets an error, at which point it will be finished exporting your 100 layers

Attribution
Source : Link , Question Author : Arturino , Answer Author : Confused

Leave a Comment