Group layer mask feather
I'm writing a script that iterates through a document's layers and applies a mask feather if there isn't already one.
var iterGroup = function(group){
for(i=0; i<group.layerSets.length; i++){
iterGroup(group.layerSets);
};
for(i=0; i<group.artLayers.length; i++){
if(group.artLayers.layerMaskFeather == 0){
//Try clause because script crashes on layers that have no mask.
try{
group.artLayers.layerMaskFeather = 0.5;
}catch(err){
};
};
};
};
iterGroup(app.activeDocument);
It does what it's supposed to do, kind of, but it only works on art layers. The big frustration I have is that we use a lot of masks on group layers, and for some reason Adobe chose to put the layerMaskFeather property in the artLayer class rather than its parent class, the layer. The layerset class seems to have no DOM access to the layerMaskFeather property, even though it's available from the GUI. I could also select each layer in turn and run an action on it, but I still need to sample the mask feather to see if the user already has a custom setting. Is there any way I can do this?
Thanks,
-Tim
