Hey, I was wondering if it is possible to detect if a layer within a comp is a solid? The code below is going through all the items in the project. If the item is a comp, it then goes into its layers and checks if its a solid. However, I am not getting anything put into the allSolids array.
var numItems = app.project.numItems; var allSolids = new Array(0); var numLayers; // store solids for(var t = 1; t < numItems + 1; t++){ if(app.project.item(t) instanceof CompItem){ numLayers = app.project.item(t).numLayers; for(var s = 1; s < numLayers; s++){ if(app.project.item(t).layer(s).source.mainSource instanceof SolidSource){ allSolids.push(app.project.item(t).layer(s)); }}} }
Thanks!