Answered
load selection to selected layers
How can I make a Load Selection for all selected layers?
Without pressing ctrl+ Mouse Click to select each layer every time

How can I make a Load Selection for all selected layers?
Without pressing ctrl+ Mouse Click to select each layer every time

You can use an action:

A script has the added bonus of being able to offer a single history step:
/*
Load Selected Layers Transparency to Selection.jsx
Stephen Marsh, 8th September 2021
v1.0
NOTE: Previously selected layers are deselected, it would be nice to retain the selected layers...
*/
function loadSelLayersTransparency() {
// Select all layers (ignores Background layer, ignores visibility)
app.runMenuItem(stringIDToTypeID('selectAllLayers'));
// Create temp merged layer
mergedLayer();
// Rename layer
app.activeDocument.activeLayer.name = "_temp";
// Load layer transparency
loadLayerTrans();
// Remove temp merged layer
app.activeDocument.activeLayer.remove();
/****************** Functions ******************/
function mergedLayer() {
var idmergeLayersNew = stringIDToTypeID("mergeLayersNew");
var desc291 = new ActionDescriptor();
var idduplicate = stringIDToTypeID("duplicate");
desc291.putBoolean(idduplicate, true);
executeAction(idmergeLayersNew, desc291, DialogModes.NO);
}
function loadLayerTrans() {
var idset = stringIDToTypeID("set");
var desc323 = new ActionDescriptor();
var idnull = stringIDToTypeID("null");
var ref75 = new ActionReference();
var idchannel = stringIDToTypeID("channel");
var idselection = stringIDToTypeID("selection");
ref75.putProperty(idchannel, idselection);
desc323.putReference(idnull, ref75);
var idto = stringIDToTypeID("to");
var ref76 = new ActionReference();
var idchannel = stringIDToTypeID("channel");
var idchannel = stringIDToTypeID("channel");
var idtransparencyEnum = stringIDToTypeID("transparencyEnum");
ref76.putEnumerated(idchannel, idchannel, idtransparencyEnum);
desc323.putReference(idto, ref76);
executeAction(idset, desc323, DialogModes.NO);
}
}
// Single history step
app.activeDocument.suspendHistory("Load Selected Layers Transparency to Selection", "loadSelLayersTransparency()");
Remove or comment out the following to only use the selected layers instead of all layers:
// Select all layers (ignores Background layer, ignores visibility)
app.runMenuItem(stringIDToTypeID('selectAllLayers'));Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.