How can I tell if a layer has a layer style by using a script?
I want to use a script to find out which layers have layer styles, but I haven't found relevant information. Does anyone know how to do this?
Subject modified by Moderator
I want to use a script to find out which layers have layer styles, but I haven't found relevant information. Does anyone know how to do this?
Subject modified by Moderator
If you use Google Search you can find code to do that on this site. You will find code like this. Test if activeLayer has a layer effect.
alert(haslayerEffects());
function haslayerEffects() {
try {
var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var options = executeActionGet(r);
return options.hasKey(stringIDToTypeID("layerEffects"))
}
catch (e) {alert(e) }
}
I extracted that from script to remove all layer effects
You often need to use Action manager code which I do not know how to code I can hack on the action manager code Adobe scriplistener plug-in records. However, for the executeActionGet code required the get information I need to use search and find. It would be better if this web site search was useable.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.