Copy link to clipboard
Copied
I would like to create an action that selects ALL layers, then merges them (and then does some other stuff). I can NOT use Flatten Image because that gets rid of the transparency. I need to select ALL layers, then do a Merge, which leaves the transparency, but I don't see any way to automate the selecting of all layers. Is there a keyboard shortcut I'm missing, or some kind of trick to do this, or is it just not possible?
You should be able to click the Actions panel menu, choose Insert Menu Item, and insert the Select > All Layers command.
Copy link to clipboard
Copied
You should be able to click the Actions panel menu, choose Insert Menu Item, and insert the Select > All Layers command.
Copy link to clipboard
Copied
I think keyboard shortcut is Ctrl + Alt + A. It should record step: - Select All Layers current layer -.
Note in case that you need: Background layer won't be selected. If you want and Background layer selected then select it using Alt + , {comma} then click on padlock icon to convert Background to normal layer then use Ctrl + Alt + A to select all layers.
Copy link to clipboard
Copied
Just for the record, another method that does not require layers to be selected (as select all layers does not always do that):
Update:
selectAllLayers();
function selectAllLayers() {
// https://feedback.photoshop.com/photoshop_family/topics/i-cant-record-sellect-all-layers-in-script-listener-and-in-actions
var c2t = function (s) {
return app.charIDToTypeID(s);
};
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
var reference = new ActionReference();
var reference2 = new ActionReference();
reference2.putEnumerated(s2t("layer"), s2t("ordinal"), s2t("targetEnum"));
descriptor.putReference(c2t("null"), reference2);
executeAction(s2t("selectAllLayers"), descriptor, DialogModes.NO);
reference.putProperty(s2t("layer"), s2t("background"));
descriptor2.putReference(c2t("null"), reference);
descriptor2.putEnumerated(s2t("selectionModifier"), s2t("selectionModifierType"), s2t("addToSelection"));
descriptor2.putBoolean(s2t("makeVisible"), false);
try {
executeAction(s2t("select"), descriptor2, DialogModes.NO);
} catch (e) { }
}