13 Replies Latest reply on Feb 19, 2018 4:40 AM by Kukurykus

    Merging an Adjustment layer to many layers.

    andreaa78353118

      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!!

        • 1. Re: Merging an Adjustment layer to many layers.
          Chuck Uebele Adobe Community Professional & MVP

          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[i];
              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 );
              }
          
          2 people found this helpful
          • 2. Re: Merging an Adjustment layer to many layers.
            chanaart Adobe Community Professional

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

             

            chana

            • 3. Re: Merging an Adjustment layer to many layers.
              Chuck Uebele Adobe Community Professional & MVP

              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.

              • 5. Re: Merging an Adjustment layer to many layers.
                Kukurykus Adobe Community Professional
                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

                • 6. Re: Merging an Adjustment layer to many layers.
                  r-bin Level 5

                  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.

                  • 7. Re: Merging an Adjustment layer to many layers.
                    Kukurykus Adobe Community Professional

                    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?

                    • 8. Re: Merging an Adjustment layer to many layers.
                      r-bin Level 5

                      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 )

                      • 9. Re: Merging an Adjustment layer to many layers.
                        Kukurykus Adobe Community Professional

                        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.

                        • 10. Re: Merging an Adjustment layer to many layers.
                          r-bin Level 5

                          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?

                          • 11. Re: Merging an Adjustment layer to many layers.
                            Kukurykus Adobe Community Professional

                            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.

                            • 12. Re: Merging an Adjustment layer to many layers.
                              r-bin Level 5

                              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? )

                              • 13. Re: Merging an Adjustment layer to many layers.
                                Kukurykus Adobe Community Professional

                                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.