Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Script to add layer mask to all layers but background?

$
0
0

Yes your change is good.  That way the last layer won't have a mask applied.  I wasn't sure if you wanted that, but put in the check for the background layer. 

 

As far as saving, what file format do you want to save to?  Here's how I save a psd:

 

var docRef = activeDocument

var doneFolder = new Folder('/c/photos/')

var layerName = docRef.activeLayer.name

var psdOptions = new PhotoshopSaveOptions();

psdOptions.layers = true;

app.displayDialogs = DialogModes.ALL;//include this line if you want the dialog box to come up.

docRef.saveAs (new File(doneFolder +'/' + layerName + '.psd'), psdOptions);

app.displayDialogs = DialogModes.NO;//Resets the ALL - you don't want to leave that on.


Viewing all articles
Browse latest Browse all 27456