• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Combining masks to create a new one - Script

Explorer ,
Apr 19, 2023 Apr 19, 2023

Copy link to clipboard

Copied

Hi everyone!
My coworker and I thought of something that would help us a lot, but we don't know how to develop it.


We receive PSDs from the client with separate groups within the PSD. And we use the groups with the names "Alpha", so we have Alpha 1, Alpha 2 and so on. In most cases, we have to merge the selection of some of these groups and create a new group with this new mask.
groups.jpg
The problem is being able to see the masks and know which ones to join, due to the size of the thumbnail. Even increasing the size in the configuration, some are hard to see.

Our idea would be, if possible, a script that generates a window, showing the masks in a larger size, and allowing us to select which ones to join, and in the end already create the group according to the numbering and the mask.

I made a simple interface on the site https://scriptui.joonas.me/ to try to illustrate the idea:

testeinterface.jpg
So if, for example, we want to combine the Alpha 1 and Alpha 7 masks, we mark their checkboxes and press the button to create. Then, in this case, the Alpha 8 group would be created, with the mask of 1 and 7 combined:
Alpha 8.jpg

The number of groups varies between images, so both the visualization in this window and the creation of the new group can change.

We also have other groups and adjustments with masks, so I don't know if it would be possible to read only the "Alpha" groups and not have all the masks in the image.


I don't know if I could explain it well, my native language is not English. I am available for any clarification.
I know it's something very complex, so I ask for your help, my knowledge of scripts is very limited.
Is it possible for us to do something like that?

Thank you all!

TOPICS
Actions and scripting

Views

1.2K

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
Valorous Hero ,
Apr 19, 2023 Apr 19, 2023

Copy link to clipboard

Copied

It's easier for you to look at the mask by turning on its channel (press "\" or "Ctrl + \", depending on Photoshop) or switch to the mask itself (alt + Click on the mask).

Such a script, if it can be done, will be very complex and slow to work.

There is no easy way to render the contents of a layer or channel in the interface accessible through a 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
Explorer ,
Apr 19, 2023 Apr 19, 2023

Copy link to clipboard

Copied

Thanks for the answer @r-bin !
We are doing it this way, looking mask by mask, but the process is slow. We wanted a faster way to visualize, select and create what we need.

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
Valorous Hero ,
Apr 19, 2023 Apr 19, 2023

Copy link to clipboard

Copied

By what criteria do you decide to use a mask or not?

Perhaps the script can do this for you if you formulate the rules.

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
Explorer ,
Apr 20, 2023 Apr 20, 2023

Copy link to clipboard

Copied

They are different products, so each one has one or more different selections. Some products even reach "Alpha 30". There's no way to know what will be selected without looking at all the masks one by one. šŸ˜ž

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 ,
Apr 20, 2023 Apr 20, 2023

Copy link to clipboard

Copied

Just to make sure: When Ā»mergingĀ« the Channels/Masks remember to use Ā»Linear Dodge (Add)Ā« instead of Ā»LightenĀ« or Ā»ScreenĀ« to avoid Ā»linesĀ« where anti-aliased or soft masks meet. 

Screenshot 2023-04-20 at 14.24.25.pngScreenshot 2023-04-20 at 14.24.31.png

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 ,
Apr 21, 2023 Apr 21, 2023

Copy link to clipboard

Copied

With the known limitations of an interface, a slightly different approach would be required.

 

One option could be to script the creation of a new file, which contains all of the masks as either separate layers or separate channels. The script would then cycle through the visibility of each layer or channel and pause for say 2 seconds or so to help with the initial evaluation. After the automated preview was finished, you would then manually review as necessary and run another script based on your review of the layers or channels to combine the masks back to the original document as a new group.

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
Explorer ,
Apr 24, 2023 Apr 24, 2023

Copy link to clipboard

Copied

LATEST

Thanks @Stephen_A_Marsh.
I was thinking about that too, since we couldn't render the images in the interface. If we only have the mask options, after a preview we select the ones we need to combine and create the group with the mask in the original image. Would it be possible?

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