decorative banner

Comp attributes and methods


    Camera active_camera Use this to retrieve a value from 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 window.

    Number width Returns the composition's width value in pixels.

    Number height Returns the composition's height value in pixels.

    Number duration Returns the composition's duration value in seconds.

    Number frame_duration Returns the frame duration in seconds.

    Array [4] bg_color Returns the background color of the composition.

    Number shutter_angle Returns the shutter-angle value of the composition in degrees.

    Number shutter_phase Returns the shutter-phase of the composition in degrees.

    Number num_layers Returns the number of layers in the composition.

    Number pixel_aspect Returns the pixel aspect ratio of the composition expressed as width/height.

    Layer, Light, or Camera layer(index) {index is a number} Retrieves the layer by number (order in the Timeline window). For example, "this_comp.layer(3)".

    Layer, Light, or Camera layer("name") {name is a string} Retrieves the layer by name. Names are matched by layer name, or source name if there is no layer name. If duplicate names exist, After Effects uses the first one in the Timeline window. For example, "this_comp.layer("Solid 1")".

    Layer, Light, or Camera layer(other_layer, rel_index) {other_layer is a layer object, and rel_index is a number} Retrieves the layer that is the rel_index (number) of layers above or below the other_layer (name). For example, "layer(this_layer, -2)" returns the layer that is two layers higher in the Timeline window than the layer on which the expression is written.