3 Replies Latest reply on Aug 17, 2015 7:18 AM by Silly-V

    A way to detect Opacity Masks?

    beck.indy

      Is there any way to access or detect an existing Opacity Mask via script? (I saw a couple similar questions asked back in 2013 and was wondering if anything had changed in CC2015.)

       

      My issue is this: I've written an Extension that automates a number of prepress tasks on files sent by clients. Sometimes the client's files contain Opacity Masks, and whenever the script moves or rotates the artwork, the contents of the mask don't move along with the rest of the art, causing the file to be incorrect. Sometimes these errors can be subtle so they go unnoticed until the client sees it (and that's capital-letters BAD). I've been searching for some way to control, or even just to detect, an Opacity Mask from a script without any success. If that's not possible, has the community found any other way to move and/or rotate artwork while retaining Opacity Masks, without the need to directly access them?

       

      Thanks!

        • 1. Re: A way to detect Opacity Masks?
          Silly-V Adobe Community Professional

          With CS6 + I think it may be possible, in only some specific situations, to detect the opacity mask by flattening an object and taking a count of the items before and after. To flatten, you probably have to record a Flatten Transparency action and play it from script, which is what I did. The opacity mask expands into a Clip Group group item, with all the stuff in it, and the clip group appears as the top object inside a new group which contains all the flattened artwork.

           

          Then, I was going to suggest trying to use effects or something, to rotate the art.
          However, I noticed that I was able to simply record an action to make and release the opacity mask. This means that with CS6+ you can go through items and release/make opacity masks , perhaps releasing, rotating and making the mask together again.

          • 2. Re: A way to detect Opacity Masks?
            beck.indy Level 1

            Silly-V wrote:

             

            However, I noticed that I was able to simply record an action to make and release the opacity mask. This means that with CS6+ you can go through items and release/make opacity masks , perhaps releasing, rotating and making the mask together again.

             

            With a little bit of fiddling, this worked perfectly! Thank you!

            • 3. Re: A way to detect Opacity Masks?
              Silly-V Adobe Community Professional

              Thanks for the feedback, this may be our best bet for right now in the world of scripting.