How to rasterize all layer groups, instead of all layers ? (Script)
Hello,
Within my Photoshop script, I have a function to rasterize all layers. It's working well, but I noticed that processing this way ignores blend modes of layer groups...
function rasterizeAllLayers(){
runMenuItem(stringIDToTypeID("selectAllLayers"));
var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
d.putReference(stringIDToTypeID("null"), r);
d.putEnumerated(stringIDToTypeID("what"), stringIDToTypeID("rasterizeItem"), stringIDToTypeID("layerStyle"));
executeAction(stringIDToTypeID("rasterizeLayer"), d, DialogModes.NO);
runMenuItem(stringIDToTypeID("selectNoLayers"));
}
So I was wondering how to edit this function to rasterize each group instead of each layer. I'm guessing the new code should also includes some way to rasterize layers that don't belong to any group...
Thank you so much in advance for your time and help !
