Hi guys.
How to check if layer has Layer Styles on it? By default, when you create a new layer, it does not have Layer Styles on it. However, when running this code:
var myComp = app.project.activeItem;
var myLayer = myComp.selectedLayers[0];
for (var a = 1; a <= myLayer.numProperties; a++) {
if (myLayer.property(a).matchName == "ADBE Layer Styles") {
alert("ADBE Layer Styles is enabled: " + myLayer.property(a).enabled);
}
}
is return True, even though it does not have Layer Styles on It. However, if you add Drop Shadow or Inner Shadow etc it will also return true. BUT if you turn eye icon off, it will return FALSE.
Thank you.