app.project.item(index).layer(index)
app.project.item(index).layer(otherLayer,relIndex)
app.project.item(index).layer(name)
Description
Returns a Layer object, which can be specified by name, an index position in this layer, or an index position relative to another layer.
Parameters
index The index number of the desired layer in this composition. An integer in the range [1…num-Layers], where numLayers is the number of layers in the composition.
—or—
otherLayer A Layer object in this composition. The rel Ind e x value is added to the index value of this layer to find the position of the desired layer.
relIndex The position of the desired layer, relative to ot h e rL aye r. An integer in the range [1–other-Lay e r. ind e x…numLayers–ot he rL aye r. index ], where numLayers is the number of layers in the composition.
This value is added to the ot herL ayer value to derive the absolute index of the layer to return.
—or—
name The string containing the name of the desired layer.
Returns
Layer object.