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

Selecting all layers in an action

New Here ,
Jun 25, 2020 Jun 25, 2020

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?

TOPICS
Actions and scripting

Views

2.6K

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

correct answers 1 Correct answer

Community Expert , Jun 25, 2020 Jun 25, 2020

You should be able to click the Actions panel menu, choose Insert Menu Item, and insert the Select > All Layers command.

Votes

Translate

Translate
Adobe
Community Expert ,
Jun 25, 2020 Jun 25, 2020

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.

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 ,
Jun 25, 2020 Jun 25, 2020

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.

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 ,
Jun 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

LATEST

Just for the record, another method that does not require layers to be selected (as select all layers does not always do that):

 

  1. Select All
  2. Copy Merged
  3. Flatten
  4. Paste Special - Paste in Place
  5. Delete Background layer

 

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) { }
            }

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