dA-tools.com

HOME > AfterFx > Script Labs > Sample Script > LayerCollection obj

LayerCollection obj

コンポに含まれるレイヤー数表示
var firstComp = app.project.item(1);
var layerCollection = firstComp.layers;
alert("number of layers is " + layerCollection.length);
レイヤー、ヌル、ソリッドを追加
var anAVItem = app.project.item(2);
layerCollection.add(anAVItem);
layerCollection.addNull();
layerCollection.addSolid((0,0,0),"BL",200,100,2,5);
alert("number of layers is " + layerCollection.length);