-
solidFill/opacity numKeys problem SCRIPTING
Hi guys! I’m doing a simple for loop through items, layers and properties. This for loop have to tell me if those layers have the property “solidFill/opacity” and if it has keyframes. I did it like this:
var curItem = null;
var curLayer = null;for(i=1;i<=app.project.numItems;i++){
curItem = app.project.item(i);
for(a=1;a<=curItem.numLayers;a++){
curLayer = curItem.layer(a);
dumpPropTree (curLayer);
}
}function dumpPropTree(rootObj) {
var countProps = rootObj.numProperties;
for (var propIndex=1; propIndex <= countProps; propIndex++) {
var prop = rootObj.property(propIndex);
var propMatchName = prop.matchName;
if(propMatchName == "solidFill/opacity" && prop.numKeys>0){
alert("Item = " + curItem.name + "\rLayer = " + curLayer.name + "\rProperty = " + prop.name + "\rNumKeys = " + prop.numKeys);
}
if (prop.numProperties > 0){
dumpPropTree(prop);
}
}
}the problem is that it alerts me with this

Has you can see, there’s no opacity property there with keyframes but the alert tell me another thing. Is there something I’m missing here?
Thanks!