• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Quick way to select all layer contents in a group?

Explorer ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

Hey, I know you can select all the content on a layer by ctrl+clicking the layer thumbnail in the layers pallet but is there a way to do that with a group?  I have a huge group with a bunch of stuff in it, i want to do an adjustment mask that only effects that group and ctrl+shift clicking each layer to add it to the selection is not fast.  

I can't seem to find any answer to this and it seems like a thing that would exist.

TOPICS
Windows

Views

5.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

Hi,

I can think of two possibilities.

  1. Duplicate your group, Make the duplicate a smart object and Ctrl+click it to get your selection
  2. Duplicate your group, merge layers in the duplicate group and Ctrl+click it to get your selection

You can then save the selection as a mask for future use

hth

  1.  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

Hi. You can apply Adjustment layers and Layer masks to Layer groups. Just select the group and apply the Adjustment and/or Mask as if were a layer. That Adjustment and/or Mask will affect all layers contained in that group.

Marlon Ceballos.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

You can clip Adjustment layer to layer group without any need for masking to limit adjustment to group only.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

I would automate using a simple 4 step action to save the selection as an alpha channel, otherwise only 3 steps:

 

atn.png

 

A script could go further, such as naming the alpha channel after the original group name.

 

That being said, one of the earlier suggestions would be preferable.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 07, 2021 Sep 07, 2021

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 07, 2021 Sep 07, 2021

Copy link to clipboard

Copied

+1 vote...

 

In the meantime:

 

/*
Load Group Transparency to Selection.jsx
Stephen Marsh, 7th September 2021
v1.0
https://community.adobe.com/t5/photoshop-ecosystem-discussions/quick-way-to-select-all-layer-contents-in-a-group/td-p/11139779
Quick way to select all layer contents in a group?
*/

function loadGroupTransparency() {
    // check for group with layers as active layer
    if ((app.activeDocument.activeLayer.typename === "LayerSet" && app.activeDocument.activeLayer.layers.length > 0)) {

        // Get layer name
        var groupName = app.activeDocument.activeLayer.name;

        // Create temp merged layer
        mergedLayer();

        // Rename layer
        app.activeDocument.activeLayer.name = groupName + "_temp";

        // Load layer transparency
        loadLayerTrans();

        // Save selection to alpha
        // selectionToAlpha();

        // 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);
        }

        function selectionToAlpha() {
            // Save selection to alpha
            var idmake = stringIDToTypeID("make");
            var desc348 = new ActionDescriptor();
            var idnew = stringIDToTypeID("new");
            var desc349 = new ActionDescriptor();
            var idname = stringIDToTypeID("name");
            // Group name
            desc349.putString(idname, groupName + " Transparency");
            var idcolorIndicates = stringIDToTypeID("colorIndicates");
            var idmaskIndicator = stringIDToTypeID("maskIndicator");
            // "selectedAreas"
            var idmaskedAreas = stringIDToTypeID("maskedAreas");
            // idselectedAreas
            desc349.putEnumerated(idcolorIndicates, idmaskIndicator, idmaskedAreas);
            var idcolor = stringIDToTypeID("color");
            var desc350 = new ActionDescriptor();
            var idred = stringIDToTypeID("red");
            desc350.putDouble(idred, 255.000000);
            var idgrain = stringIDToTypeID("grain");
            desc350.putDouble(idgrain, 0.000000);
            var idblue = stringIDToTypeID("blue");
            desc350.putDouble(idblue, 0.000000);
            var idRGBColor = stringIDToTypeID("RGBColor");
            desc349.putObject(idcolor, idRGBColor, desc350);
            var idopacity = stringIDToTypeID("opacity");
            desc349.putInteger(idopacity, 50);
            var idchannel = stringIDToTypeID("channel");
            desc348.putObject(idnew, idchannel, desc349);
            var idusing = stringIDToTypeID("using");
            var ref88 = new ActionReference();
            var idchannel = stringIDToTypeID("channel");
            var idselection = stringIDToTypeID("selection"); // 
            ref88.putProperty(idchannel, idselection);
            desc348.putReference(idusing, ref88);
            executeAction(idmake, desc348, DialogModes.NO);
        }

    } else {
        alert("This action only works on a selected Layer Group");
    }
}
// Single history step
app.activeDocument.suspendHistory("Load Group Transparency to Selection", "loadGroupTransparency()");

 

 

EDIT: Here is one for selected layers.

 

/*
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() {

    // 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()");

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 07, 2024 Apr 07, 2024

Copy link to clipboard

Copied

LATEST

Thanks adobe, you sack as always

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines