How to get a layer's styles values?
I found a topic in adobe's forum (which in turn led me to here) but there was only 3 functions: getStrokeSize, getStrokeColor, getGradientInfo. And its not gonna be helped by looking at the code and try to guess how to get other properties. The code it cryptic. So, does anyone know how to get details about layer styles?
Or, any help on how these 3 functions work so I can get it from there and expand the functions?
here's the getStrokeSize function:
Code: Select allfunction getStrokeSize(){
try{
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('layerEffects')).getObjectValue(stringIDToTypeID('frameFX'));
return desc.getUnitDoubleValue(stringIDToTypeID('size'));
}catch(e){}
};
Why phtotoshop DOM does not allow something like this?
Code: Select alllayer.styles.dropShadow.distance