-
(Scripting) – Is there a way to determine if a layer style exists?
Sorry if this is not the right forum for AE scripting questions – it’s the closest I could find.
When I try to determine whether or not a layer has a drop shadow layer style applied using the code below, I always get TRUE, even if the layer in question has no drop shadow applied. Likewise checking its distance value always gives the default 5 (unless a drop shadow has actually been applied, in which case I get the correct distance value).
Do the propertyGroup objects for Layer Styles and Drop Shadow always exist somewhere behind the scenes? I just need to determine if a layer has a visible drop shadow or not. I feel like I must be missing something obvious…
Thanks in advance.
alert(curLayer.layerStyle.property("Drop Shadow").enabled);//yields true
alert(curLayer.layerStyle.property("Drop Shadow").property("Distance").value); //yields 5 if no D.S. applied-Scott