3 Replies Latest reply on Aug 27, 2012 4:31 AM by c.pfaffenbichler

    Delete folder Mask

    Domaneni Level 1

      Hi,

      I have a script that copy mask from folder to all children layers. But I have problem with delete mask from folder. Can you help me with this?? I try to use script listener but it do nothing on delete mask.

       

      Thank you for your help

      Domaneni

        • 1. Re: Delete folder Mask
          c.pfaffenbichler Level 9

          Are you sure you know what you are doing? (Applying a Layer Mask to a Group is not the same as applying the same Layer Mask to all contained Layers.)

           

          Does this not work?

          var id495 = charIDToTypeID( "Dlt " );
          var desc95 = new ActionDescriptor();
          var id496 = charIDToTypeID( "null" );
          var ref66 = new ActionReference();
          var id497 = charIDToTypeID( "Chnl" );
          var id498 = charIDToTypeID( "Chnl" );
          var id499 = charIDToTypeID( "Msk " );
          ref66.putEnumerated( id497, id498, id499 );
          desc95.putReference( id496, ref66 );
          executeAction( id495, desc95, DialogModes.ALL );
          
          • 2. Re: Delete folder Mask
            Domaneni Level 1

            It seems that not

             

            But I know only two way how apply Group Mask to contained layers.

            1. Merge Group with Mask to one layer

            2. Copy Group Mask to contained layers and rasterized them individually.

             

            Do you know some other way?? I need separated layers, not merged.

             

            Domaneni

            • 3. Re: Delete folder Mask
              c.pfaffenbichler Level 9

              I guess I missunderstood what you meant with

              But I have problem with delete mask from folder.

              Because the above code deletes Layer Masks from Groups just fine.

               

              Action Manager code should be faster (more complicated, though), but it might be easier to use the DOM and load the Mask and apply it to all contained Layers with a for-clause.

              What aboud Layers that already have a Layer Mask?