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

Recognize Solid in Comp?

$
0
0

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!


Viewing all articles
Browse latest Browse all 2143

Trending Articles



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