ADOBE AFTER EFFECTS 7.0
User Guide
577
Retrievesthelayerbyname.Namesarematchedbylayername,orsourcenameifthereisnolayername.Ifduplicate
names exist, After Effects uses the first one in the Timeline panel. Example:
thisComp.layer("Solid 1")
layer(otherLayer, relIndex) Return type: Layer, Light, or Camera.
Argument type: otherLayer is a Layer object, and relIndex is a Number.
Retrieves the layer that is relIndex layers above or below otherLayer. For example,
layer(thisLayer, -2) returns the
layer that is two layers higher in the Timeline panel than the layer on which the expression is written.
marker(“name“) Return type: Number.
Argument type: name is a String.
Retrieves the time of a composition-time marker. For example, you can use this in an expression written on a layer’s
opacity property to to fade out at the time where the marker resides:
markTime = thisComp.marker(1); linear(time, markTime -.5, markTime, 100, 0)
numLayers Return type: Number.
Returns the number of layers in the composition.
activeCamera Return type: Camera.
Returns the Camera object for the camera through which the composition is rendered at the current frame. This is
not necessarily the camera through which you are looking in the Composition panel.
width Return type: Number.
Returns the composition’s width, in pixels.
height Return type: Number.
Returns the composition’s height, in pixels.
duration Return type: Number.
Returns the composition’s duration, in seconds.
displayStartTime Return type: Number.
Returns the composition start time, in seconds.
frameDuration Return type: Number.
Returns the frame duration, in seconds.
shutterAngle Return type: Number.
Returns the shutter-angle value of the composition, in degrees.
shutterPhase Return type: Number.
Returns the shutter-phase of the composition, in degrees.
bgColor Return type: Array [4].
Returns the background color of the composition.
pixelAspect Return type: Number.
Returns the pixel aspect ratio of the composition.
name Return type: String.