Here is a quick little script I made for Photoshop. The script is designed to make working with masks in multiple layers much easier. What it does it sync the mask on the currently selected layerSet to the masks of all layerSets that share the same name.
I find this makes it very easy for me to work with PBR materials in Photoshop, since I can make a layerSet for a material like copper, in my Albedo, Roughness, and Metallic maps define the material with in all of those groups. Than once I want to blend that new material into my textures, I can paint on the mask of only one of its layer groups, and use the script to quickly transfer the mask between layer groups.
I have also included a helper script, to make the creation of layerSets for materials easier, and to simplify the naming process for this script.
DownloadSourceCode(GitHub)
I have only been able to test for Photoshop CS6, since that is the only one i own. But I think it should work back as far as cs4. I would greatly appreciate it if people would test for CS4, CS5 and CC and get back to me.
If any bugs are found please let me know on this topic, or create a issue on the scripts github page.
Replies
Thanks for the script, it'll fit into our workflow nicely I hope!
Photoshop is the only adobe app i own, so as a result i cant build extension pallets, since i don't have flash and flashbuilder. So im just using the extension installer as a easy way to package things.
you can run it directly from the file > and scripts menu, and there is also a little helper function in there, that installs it to the actions pallet for you as well.
Ok, so got it to sync layerset masks, which is great.
This works based upon the LayerSet name correct? Sync Selected brings up a list of the current layersets...but if they've got the same name, how do you differentiate them as the user?
The Create Material does nothing for me.
The way i setup my layer-groups is by having my top level groups be for my
Albedo, roughness, and metallic You can use any naming scheme you want.
Once you create those, if you go to create material, and give it a name, it will make a layerset underneath each those top level groups.
When you use sync all, use you it with a group with a mask selected, and it will find all other groups with the same name, and sync the mask to those.
Thinking i will make some changes, so it dosnt ignore the top level groups, but for performance reasons i don't think i will make it work on all layers ever, just on groups.
*.md stand for markdown its a markup language that looks like plain text. I just use it because it can be read perfectly fine as plain text, and it also can be read by the syntax highlighter on github to provide a styled readme.
e.g. Rust layer mask synced with albedo/metal/roughness etc. rather than a group of groups.
But ya, i have to agree the current set-up is kinda rigid in how it works, and really based around my workflow and not much else.
Thanks for sharing!
Also the sync selective script, asks you which groups to sync in.
But what i wont to do in the future, is make it work on all layer types, and to make the sync selective save its settings in the doc so you dont have to bring up the UI every time for it.
Actually you don't need to have flash builder or flash professional, to create panels you can manage to create flex panels with FlashDevelop, CSXInterface library and Flex 3.6 sdk all these are free.
Nice i wasn't aware of that, so can make a fully interactive panel? And like configurator would i need to build for every PS version?
every time the user selects a group in the panel it will update the document metadata with an array containing the names of the groups selected in the panel, and when the user chose to create the materials or set the masks, your script first will first look into the metadata to take the groups selected than it will run the script for that groups.
The metadata pat is not implemented now, this is for you to see if you like this kind of panel and interaction for your script.
http://www.buliarca.net63.net/tools/photoshop/PsSinkMasks.rar
Also if you want I can help you with the panel On my spare time. Or I can sent you the FlashDevelop project for it.
http://wiki.polycount.net/PhotoshopTools#Actions.2C_Filters.2C_Scripts