Check if Layer Has Specific Effect Applied To It
In extendscript, how can I check if a layer has a specific effect applied to it? For example, suppose I want to check if a given layer has the "motion tile" effect applied to it. Essentially, this is the pseudocode of what I want:
var layer_number = 1;
if (app.project.item(1).layer(layer_number) has motion tile applied)
{
alert("It does!");
}
else
{
add motion tile effect to app.project.item(1).layer(layer_number);
}
Can somebody please help me translate this pseudocode into real code that extendscript will recognize for After Effects? Thanks.
