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 );
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.
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?