Javascript for photoshop
I have been programming a .jsx to automate some tasks in photoshop CC. I have been successful in all of the tasks that I needed to do except for one.
I need to create a layermask, which is easy to do via the UI, but I can't quite figure out how to actually make the mask show up and link it to the layer the way I do it in the UI. I can create the selections and invert in my program, just like I do in the UI. However, in the UI I then select the tiny "add layer mask " icon on the bottom of the layers section and a layer mask is automatically added to the layer that I had previously selected. I also found that I can actually do a paste with the inverted selection when in the UI, but it adds the mask to a layer and I don't know how to access that layer programmatically. Is it really a channel?
I want to translate that action into code. If I create a channel as a masked area do I link it to the layer that I want?
Any help will be appreciated, I have been reading references and searching endlessly.
Message was edited by: Jeanne Kendall I used the addMask function that was posted here and it worked. However, now I just need to use the maskedarea that I had created. Thanks!
