Skip to content

AV Layer

AVLayer

AVLayer(
    auto_orient: AutoOrientType,
    comment: str,
    containing_comp: CompItem,
    effects: list[PropertyGroup],
    enabled: bool,
    frame_in_point: int,
    frame_out_point: int,
    frame_start_time: int,
    id: int,
    in_point: float,
    label: Label,
    layer_type: str,
    locked: bool,
    markers: list[MarkerValue],
    name: str,
    null_layer: bool,
    out_point: float,
    _parent_id: int,
    start_time: float,
    shy: bool,
    solo: bool,
    stretch: float,
    text: PropertyGroup | None,
    time: float,
    transform: list[Property],
    blending_mode: BlendingMode,
    frame_blending_type: FrameBlendingType,
    quality: LayerQuality,
    sampling_quality: LayerSamplingQuality,
    track_matte_type: TrackMatteType,
    adjustment_layer: bool,
    audio_enabled: bool,
    collapse_transformation: bool,
    effects_active: bool,
    environment_layer: bool,
    frame_blending: bool,
    guide_layer: bool,
    motion_blur: bool,
    preserve_transparency: bool,
    three_d_layer: bool,
    time_remap_enabled: bool,
    _source_id: int,
)

Bases: Layer

The AVLayer object provides an interface to those layers that contain AVItem objects (composition layers, footage layers, solid layers, text layers and sound layers).

Info

AVLayer is a subclass of Layer object. All methods and attributes of Layer are available when working with AVLayer.

Info

AVLayer is a base class for TextLayer object, so AVLayer attributes and methods are available when working with TextLayer objects.

See: https://ae-scripting.docsforadobe.dev/layer/avlayer/

Attributes

adjustment_layer

adjustment_layer: bool

When True, the layer is an adjustment layer.

audio_enabled

audio_enabled: bool

When True, the layer's audio is enabled. This value corresponds to the audio toggle switch in the Timeline panel.

auto_orient

auto_orient: AutoOrientType

The type of automatic orientation to perform for the layer.

blending_mode

blending_mode: BlendingMode

The blending mode of the layer.

collapse_transformation

collapse_transformation: bool

True if collapse transformation is on for this layer.

comment

comment: str

A descriptive comment for the layer.

containing_comp

containing_comp: CompItem = field(repr=False)

The composition that contains this layer. Set after parsing when the full project structure is available.

effects

effects: list[PropertyGroup]

Contains a layer's effects (if any).

effects_active

effects_active: bool

True if the layer's effects are active, as indicated by the icon next to it in the user interface.

enabled

enabled: bool

Corresponds to the video switch state of the layer in the Timeline panel.

environment_layer

environment_layer: bool

True if this is an environment layer in a Ray-traced 3D composition.

frame_blending

frame_blending: bool

True if frame blending is enabled for this layer.

frame_blending_type

frame_blending_type: FrameBlendingType

The type of frame blending to perform when frame blending is enabled for the layer.

frame_in_point

frame_in_point: int

The "in" point of the layer, expressed in composition time (frames). This is the first frame where the layer becomes visible. The binary format stores this relative to start_time; parsed value is absolute composition time.

frame_out_point

frame_out_point: int

The "out" point of the layer, expressed in composition time (frames). This is the first frame where the layer is no longer visible. Clamped to composition duration to match ExtendScript behavior.

frame_start_time

frame_start_time: int

The start time of the layer, expressed in composition time (frames). This determines where the layer's first frame of content appears in the composition timeline.

guide_layer

guide_layer: bool

True if the layer is a guide layer.

height

height: int

The height of the layer in pixels.

Returns the source item's height if available, otherwise falls back to the containing composition's height (matches ExtendScript behavior for source-less layers like text and shape layers).

id

id: int

Unique and persistent identification number used internally to identify a Layer between sessions.

in_point

in_point: float

The "in" point of the layer, expressed in composition time (seconds). This is the time at which the layer starts being visible in the composition. The binary format stores this relative to start_time as a signed integer; parsed value is absolute composition time.

is_name_from_source

is_name_from_source: bool

True if the layer has no expressly set name, but contains a named source.

In this case, layer.name has the same value as layer.source.name. False if the layer has an expressly set name, or if the layer does not have a source.

is_name_set

is_name_set: bool = field(init=False)

label

label: Label

The label color. Colors are represented by their number (0 for None, or 1 to 16 for one of the preset colors in the Labels preferences).

layer_type

layer_type: str

The type of layer (footage, light, camera, text, shape).

locked

locked: bool

When True, the layer is locked. This corresponds to the lock toggle in the Layer panel.

markers

markers: list[MarkerValue]

Contains a layer's markers.

motion_blur

motion_blur: bool

True if motion blur is enabled for the layer.

name

name: str

The name of the layer.

null_layer

null_layer: bool

When True, the layer was created as a null object.

out_point

out_point: float

The "out" point of the layer, expressed in composition time (seconds). This is the time at which the layer stops being visible in the composition. Clamped to composition duration to match ExtendScript API behavior (a layer's out_point cannot exceed its containing composition's duration). The binary format stores this relative to start_time.

parent

parent: Layer | None

The parent layer for layer parenting. None if no parent.

preserve_transparency

preserve_transparency: bool

True if preserve transparency is enabled for the layer.

quality

quality: LayerQuality

The layer's draft quality setting.

sampling_quality

sampling_quality: LayerSamplingQuality

The layer's sampling method.

shy

shy: bool

When True, the layer is "shy", meaning that it is hidden in the Layer panel if the composition's "Hide all shy layers" option is toggled on.

solo

solo: bool

When True, the layer is soloed.

source

source: Item | None

The source item for this layer. None for a text layer.

start_time

start_time: float

The start time of the layer, expressed in composition time (seconds).

stretch

stretch: float

The layer's time stretch, expressed as a percentage. A value of 100 means no stretch. Values between 0 and 1 are set to 1, and values between -1 and 0 (not including 0) are set to -1.

text

text: PropertyGroup | None

Contains a layer's text properties (if any).

three_d_layer

three_d_layer: bool

True if this layer is a 3D layer.

time

time: float

The current time of the layer, expressed in composition time (seconds).

time_remap_enabled

time_remap_enabled: bool

True if time remapping is enabled for this layer.

track_matte_type

track_matte_type: TrackMatteType

Specifies the way the track matte is applied.

transform

transform: list[Property]

Contains a layer's transform properties.

width

width: int

The width of the layer in pixels.

Returns the source item's width if available, otherwise falls back to the containing composition's width (matches ExtendScript behavior for source-less layers like text and shape layers).