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

Merging an Adjustment layer to many layers.

New Here ,
Dec 13, 2017 Dec 13, 2017

Copy link to clipboard

Copied

Hello, I believe after 20 years of photoshop, someone must have implemented this feature since it is very frustrating working without it.

I have an Adjustment Layer.
Below it, I have 50 Layers.
I WANT SPECIFICALLY  MERGE the adjustment layer to  EACH OF all the below 50 layers.
I DON'T want merge all the layers.
I DON'T WANT to group the layers and have the adjustment layer there.

What I would do now is to duplicate the Adjustment layers 50 times and click for each couple (Adjustment layer-Picture Layer), Merge Layers.

This is unfeasible and very frustrating.
I have heard about strange things with smart objects or batch, ALL INCOMPLETE solutions. THIS is a DAILY PROBLEM of millions artists.
PLEASE provide STEP BY STEP solutions!!
Thank you very much!!

TOPICS
Actions and scripting

Views

6.3K

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 , Dec 13, 2017 Dec 13, 2017

Try this script. You have to have the adjustment layer selected when you run the script! It will not merge with a smart object nor a group (layer set). It will only merge with layers that are below it, and that are in the same "group" such as the top level of the file, or in a layer set.

#target photoshop

var doc = activeDocument;

var adjL = doc.activeLayer

for(var i = adjL.parent.layers.length-1;i>0;i--){

    doc.activeLayer = adjL.parent.layers;

    var nextL = doc.activeLayer

    if(nextL.name == ad

...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 13, 2017 Dec 13, 2017

Copy link to clipboard

Copied

Try this script. You have to have the adjustment layer selected when you run the script! It will not merge with a smart object nor a group (layer set). It will only merge with layers that are below it, and that are in the same "group" such as the top level of the file, or in a layer set.

#target photoshop

var doc = activeDocument;

var adjL = doc.activeLayer

for(var i = adjL.parent.layers.length-1;i>0;i--){

    doc.activeLayer = adjL.parent.layers;

    var nextL = doc.activeLayer

    if(nextL.name == adjL.name){break;}

    if(nextL.typename !='LayerSet'){

        try{

            doc.activeLayer = adjL

            dupeL ();

            var tempL = doc.activeLayer

            tempL.move(nextL,ElementPlacement.PLACEBEFORE);

            mergeL ();

            }

        catch(e){

            tempL.remove()

            }

        }

   

    }

function mergeL(){

     var idMrgtwo = charIDToTypeID( "Mrg2" );

        var desc5 = new ActionDescriptor();

    executeAction( idMrgtwo, desc5, DialogModes.NO );  

    }

function dupeL(){

    var idCpTL = charIDToTypeID( "CpTL" );

        executeAction( idCpTL, undefined, DialogModes.NO );

    }

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
New Here ,
May 11, 2023 May 11, 2023

Copy link to clipboard

Copied

This is grate!

We noticed a little correction needed at line 5.
doc.activeLayer = adjL.parent.layers[i];

Thanks again for the solution!

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 ,
Dec 13, 2017 Dec 13, 2017

Copy link to clipboard

Copied

Can you send the demo file and explain so I can re do it and see how to make it happen?

chana

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 ,
Dec 14, 2017 Dec 14, 2017

Copy link to clipboard

Copied

If you still want to do it manually, you can copy the adjustment layer, then use alt/opt-[ to go down to the next layer, ctrl/cmd-V to paste the adjustment layer, then ctrl/cmd-E to merge it down. It saves the step of duplicating the adjustment layer and moving it.

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
Adobe Employee ,
Feb 16, 2018 Feb 16, 2018

Copy link to clipboard

Copied

Moved to Photoshop Scripting

Thanks,

Mohit

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
LEGEND ,
Feb 16, 2018 Feb 16, 2018

Copy link to clipboard

Copied

If you still want to do it manually, you can copy the adjustment layer (...) to paste the adjustment layer

I tried actually next step so alt and [ but did mistake and pressed alt with one of arrow keys. It was the same I duplicated adjustment layer (though I checked my shortcuts and this one wasn't listed, also in layers dropdown menu). So if anyone wants to do it manually it can be done this way (alt & [ between) instead of choosing copy and then paste certain layer

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
People's Champ ,
Feb 16, 2018 Feb 16, 2018

Copy link to clipboard

Copied

IMHO: All of the above said will not work correctly if the layers have a blend mode other than Nornal, or the Opacity is not 100% for example.

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
LEGEND ,
Feb 16, 2018 Feb 16, 2018

Copy link to clipboard

Copied

I did it with other blend mode & changed opacity and it worked the way if I used menu options, so what do you mean then?

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
People's Champ ,
Feb 16, 2018 Feb 16, 2018

Copy link to clipboard

Copied

Kukurykus  написал(а)

I did it with other blend mode & changed opacity and it worked the way if I used menu options, so what do you mean then?

A file of four layers. The bottom is filled completely. The next two are small disjoint squares. The top layer is Levels.

Option 1:

Bottom layer fill 194 194 194, opacity 100, Normal Mode

next small square layer fill 100 100 100, opacity 100, Screen Mode

next small square layer fill 100 100 100, opacity 100, Normal Mode

Top layer Levels inp(0 1 207)  out(0 255)

Option 2:

Bottom layer fill 0 0 0, opacity 100, Normal Mode

next small square layer fill 100 100 100, opacity 50, Normal Mode

next small square layer fill 100 100 100, opacity 100, Normal Mode

Top layer Levels inp(0 1 255)  out(105 255)

Check )

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
LEGEND ,
Feb 18, 2018 Feb 18, 2018

Copy link to clipboard

Copied

I thought you answer to me because there is difference in result between script or manual way to do it and that I proposed (expanded of alt & arrow key). But I compared all three versions and they give the same result, so I think you should inform Chuck Uebele to change that script and andreaa78353118 who is going to use it. I only showed that doing it manually you can use alt & arrow key instead of selecting it from menu. btw "ctrl/cmd-V to paste the adjustment layer" actually is not needed.

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
People's Champ ,
Feb 19, 2018 Feb 19, 2018

Copy link to clipboard

Copied

Alt + Arrows only works when the MoveTool tool is selected and does Nudge. Accordingly, moves the mask if it is not empty. Am I mistaken?

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
LEGEND ,
Feb 19, 2018 Feb 19, 2018

Copy link to clipboard

Copied

Yes, Alt with Arrow works only when MoveTool is selected, but doesn't nudge (if you mean move canvas). Nudging is when you use arrows without alt. Alt and Arrow does not move mask (adjustment layer) however it is filled / empty. Canvas can be moved (nudged?), but adjustment layer (mask) not, using arrows only. At least it is how I found by mistake it is working.

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
People's Champ ,
Feb 19, 2018 Feb 19, 2018

Copy link to clipboard

Copied

Kukurykus  написал(а)

lt. Alt and Arrow does not move mask (adjustment layer) however it is filled / empty.

Create a document with a white background. Select a small rectangle with the marquee tool. Create a Levels layer with the Mask from the selection. Set the parameters to Levels inp (0 1 255) out (0 200). Press Alt + Up. What do you see? )

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
LEGEND ,
Feb 19, 2018 Feb 19, 2018

Copy link to clipboard

Copied

Youre right. Both adjustment layer in layers panel is copied but in this specific case also selected square is nudged (changing position accordingly to choosen arrow). But "their" script doesn't use marque tool and it copies entire layer, not little part Good to know it after all, if someone used this script for smaller squares or just to know it when it is used for other goals.

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
New Here ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

HOW DO I CREATE A SCRIPT FILE FOR THIS CODE ? I AM GETTIN

 

Error 1200 IN THIS LINE doc.activeLayer = adjL.parent.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
Advocate ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

Replace...

    doc.activeLayer = adjL.parent.layers;

...with...

    doc.activeLayer = adjL.parent.layers[i];

 

Be sure you have selected the adjustment layer when running the script

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
New Here ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

Thanks!!!!!!

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
Mentor ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

For anyone who needs this workflow, there's a free tool called Layers to Files (Fast) that can automate this and a few other essential workflows. Just add your adj layer on top, then choose Top Layer as Foreground.
https://github.com/antipalindrome/Photoshop-Export-Layers-to-Files-Fast
https://github.com/antipalindrome/Photoshop-Export-Layers-to-Files-Fast/releases/tag/v2.6.0

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
New Here ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

LATEST

Thank You!

I know little to nothing about scripts, but this worked prferctly for me.

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