Copy link to clipboard
Copied
i need to get number of angle from drop shadow ..i`m making this but i get 90° everytime ..can you help me?
angle = desc.getDouble( stringIDToTypeID('localLightingAngle'));
You get localLightingAngle (i.e. angle without "use global light" option)
When the "use global light" option is turned on, FX panel shown value from globalLight value of layer, i.e.:
function s2t(s) {return stringIDToTypeID(s)}
var ref = new ActionReference()
ref.putEnumerated( s2t("layer"), s2t("ordinal"), s2t("targetEnum"))
$.writeln ("Global angle is turned on: " + executeActionGet(ref).getObjectValue(s2t("layerEffects")).getObjectValue (s2t("dropShadow")).getBoolean(s2t("useGlobalAngle"
...
Copy link to clipboard
Copied
How was the object "desc" set? If you show that code perhaps r-bin can help.
Copy link to clipboard
Copied
You get localLightingAngle (i.e. angle without "use global light" option)
When the "use global light" option is turned on, FX panel shown value from globalLight value of layer, i.e.:
function s2t(s) {return stringIDToTypeID(s)}
var ref = new ActionReference()
ref.putEnumerated( s2t("layer"), s2t("ordinal"), s2t("targetEnum"))
$.writeln ("Global angle is turned on: " + executeActionGet(ref).getObjectValue(s2t("layerEffects")).getObjectValue (s2t("dropShadow")).getBoolean(s2t("useGlobalAngle")))
$.writeln ("Local angle of dropShadow FX: " + executeActionGet(ref).getObjectValue(s2t("layerEffects")).getObjectValue (s2t("dropShadow")).getUnitDoubleValue(s2t("localLightingAngle")))
$.writeln ("Global angle of layer FX: " + executeActionGet(ref).getUnitDoubleValue(s2t("globalAngle")))
Copy link to clipboard
Copied
Make it to work faster by using:
ref.putProperty(stringIDToTypeID('property'), stringIDToTypeID('layerEffects'))
after:
var ref = new ActionReference()
then before last line such 3 lines use again but with 'layerEffects' replaced by 'globalAngle'
btw anyone know why I can see coloured code during posting (when set to JavaScript language) but when I visit the topic with the colored code, it only flicks for one second to turn into grey?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now