drew_bristow's profile

8 Messages

 • 

168 Points

Wed, Apr 1, 2020 8:34 AM

2

Photoshop: Apply mask to selected layers

In my job, we quite often need to apply a layer mask to a psd containing lots of layers/folders. Currently the only way to apply the same mask (for example a mask of the entire workspace) is to either apply it individually to each layer, or to create the mask on one layer and alt-drag copying it to the next layers. It would be a big time saver and less fiddly to be able to select all the layers needing the mask, and then when you hit the mask button, it applies to all selected layers. Seems like something so simple, so I'm wondering why it's not possible?

Responses

624 Messages

 • 

12.4K Points

1 y ago

The other way is to create a group of your layers(CTRL + G of selected layers) and mask that group. That gives more flexibility in the event that you need to fine-tune the mask, you won't have to do this 20 times but once to the group... 

8 Messages

 • 

168 Points

Unfortunately I'd still need to manually go and switch on or off the groups within that group. Typically a psd file will contain anything between 1-20 groups, those groups will have a screen ID as their name, and with will be the image and anything associated with editing that image (like adjustment layers etc.)

Adobe Administrator

 • 

15.9K Messages

 • 

296.4K Points

1 y ago

This is probably doable with scripting if you're handy with JavaScript. Or check with some folks here to see if anyone has already written one: https://www.ps-scripts.com

Sr. Product Manager, Adobe Digital Imaging

Champion

 • 

1.9K Messages

 • 

27.5K Points

1 y ago

I see a noticeable risk in the »semitransparent edge pixels» (due to Feathering, Anti-Aliasing, ...) when a Mask is applied to multiple Layers as compared to a Group containing those Layers. 
It may be irrelevant for you and unnoticeable in many cases but for some combinations it could become a nuisance. 

Champion

 • 

627 Messages

 • 

14.7K Points

1 y ago

Totally untested, but check out this script... it should let you run an action on all selected layers... so if you make a named layer called "actionmask" and record an action for:
  1. Select pixels on "actionmask" layer (ctrl-click the layer thumbnail)
  2. Create mask
You should then be able to play that action on all selected layers and win at masks?
https://github.com/Paul-Riggott/PS-Scripts/blob/master/Run%20Action.jsx

8 Messages

 • 

168 Points

1 y ago

Ooooh that sounds good! Thanks Max, I'll give it a go asap!

8 Messages

 • 

168 Points

1 y ago

Hi Max! I never got round to trying this but I've reached a point I need to again, that link takes me to a bunch of code - how do I use it?

123 Messages

 • 

1.9K Points

1 y ago

Hi Drew, take a look at the following blogpost for more on saving and running scripts:

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

8 Messages

 • 

168 Points

Thanks Stephen, that helped! Managed to save off and install the script, it didn't actually do what I needed it to do, but at least now I know how to get scripts working :) 

123 Messages

 • 

1.9K Points