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!!
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
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 );
}
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!
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
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.
Copy link to clipboard
Copied
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
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.
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?
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 )
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.
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?
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.
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? )
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.
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;
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
Copy link to clipboard
Copied
Thanks!!!!!!
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
Copy link to clipboard
Copied
Thank You!
I know little to nothing about scripts, but this worked prferctly for me.