Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Check if "Layer Styles" exist

$
0
0

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.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>