app.project.item(index).layers
Description
The LayerCollection object represents a set of layers. The LayerCollection belonging to a CompItem object contains all the layer objects for layers in the composition. The methods of the collection object allow you to manipulate the layer list.
• LayerCollection is a subclass of Collection. All methods and attributes of Collection, in addition to those listed below, are available when working with LayerCollection.
Example
Given that the first item in the project is a CompItem and the second item is an AVItem, this example shows the number of layers in the CompItem’s layer collection, adds a new layer based on an AVItem in the project, then displays the new number of layers. Method Reference Description
Methods
add() “LayerCollection add() method” Creates a new AVLayer and adds it to this collection.
addNull() “LayerCollection addNull() method” Creates a new, null layer and adds it to this collection.
addSolid() “LayerCollection addSolid() method” Creates a new layer, a FootageItem with a SolidSource, and adds it to this collection.
addText() “LayerCollection addText() method” Creates a new point text layer and adds it to this collection.
addBoxText() “LayerCollection addBoxText() method” Creates a new paragraph (box) text layer and adds it to this collection.
addCamera() “LayerCollection addCamera() method” Creates a new camera layer and adds it to this collection.
addLight() “LayerCollection addLight() method” Creates a new light layer and adds it to this collection.
addShape() “LayerCollection addShape() method” Creates a new shape layer and adds it to this collection.
byName() “LayerCollection byName() method” Retrieves the layer object with a specified name.
precompose() “LayerCollection precompose() method” Collects specified layers into a new composition.