Get layerKind of a specific layer (I got the index) through Action Manager scripting
Hey there,
I'm looking for a way to get the actual "layerKind" of a layer through Action manager.
Now, I know I can get a layerKind with this piece of code, but it's not the actual layerKind like the one you get through "app.activeDocument.activeLayer.kind"
function getLayerKindByIndex(theIndex) {
(r = new ActionReference ()).putProperty(stringIDToTypeID('property'), stringIDToTypeID('layerKind'));
r.putIndex(charIDToTypeID('Lyr '), theIndex);
d = executeActionGet (r);
return d.getInteger(stringIDToTypeID('layerKind'));
}
For instance, the function above will return 2 for any Adjustment layer, while "app.activeDocument.activeLayer.kind" will return a much more detailed value like "LayerKind.CURVES" and "LayerKind.HUESATURATION" and so on.
Is there any way I can get this detailed layerKind, with AM ?
Again... many thanks.
J.
