Skip to content

Property

Property

Property(
    enabled: bool,
    match_name: str,
    name: str,
    property_depth: int,
    animated: bool,
    can_vary_over_time: bool,
    color: bool,
    dimensions_separated: bool,
    dimensions: int,
    expression_enabled: bool,
    expression: str,
    integer: bool,
    is_spatial: bool,
    keyframes: list[Keyframe],
    locked_ratio: bool,
    no_value: bool,
    property_control_type: PropertyControlType,
    property_value_type: PropertyValueType,
    value: Any,
    units_text: str,
    vector: bool,
    default_value: Any = None,
    expression_error: str = "",
    last_value: Any = None,
    max_value: Any = None,
    min_value: Any = None,
    nb_options: int | None = None,
    property_parameters: list[str] | None = None,
)

Bases: PropertyBase

The Property object contains value, keyframe, and expression information about a particular AE property of a layer. An AE property is a value, often animatable, of an effect, mask, or transform within an individual layer.

Example
from aep_parser import parse

app = parse("project.aep")
comp = app.project.compositions[0]
prop = comp.layers[0].transform.property(name="ADBE Position")
print(prop.value)
Info

Property is a subclass of PropertyBase. All methods and attributes of PropertyBase are available when working with Property.

See: https://ae-scripting.docsforadobe.dev/property/property/

Attributes

active

active: bool

Same as enabled.

animated

animated: bool

When True, the property has keyframes.

can_set_enabled

can_set_enabled: bool

True if the enabled attribute value can be set.

This is True for all layers, effect property groups, shape vector groups, and text path options.

can_vary_over_time

can_vary_over_time: bool

When True, the named property can vary over time — that is, keyframe values or expressions can be written to this property.

Note

A small subset of effect dropdown / menu parameters may report can_vary_over_time as False in the binary even though After Effects allows keyframing them.

color

color: bool

When True, the property value is a color.

default_value

default_value: Any = None

The default value of the property.

dimensions

dimensions: int

The number of dimensions in the property value (1, 2, or 3).

dimensions_separated

dimensions_separated: bool

When True, the property's dimensions are represented as separate properties. For example, if the layer's position is represented as X Position and Y Position properties in the Timeline panel, the Position property has this attribute set to True. This attribute applies only when the property is a "separation leader" (a multidimensional property that can be separated).

elided

elided: bool = field(init=False, default=False)

When True, the property is not shown in the UI. An elided property is still present in the timeline but hidden from view.

enabled

enabled: bool

Corresponds to the setting of the eyeball icon.

expression

expression: str

The expression for the named property. Writeable only when can_set_expression for the named property is True.

expression_enabled

expression_enabled: bool

When True, the named property uses its associated expression to generate a value. When False, the keyframe information or static value of the property is used.

expression_error

expression_error: str = ''

Contains the error, if any, generated by evaluation of the string most recently set in expression. If no expression string has been specified, or if the last expression string evaluated without error, contains the empty string ("").

Note

The parser cannot evaluate expressions, so this attribute is always an empty string. After Effects computes expression errors at runtime when it evaluates the expression engine; this information is not stored in the binary .aep file.

has_max

has_max: bool

True if there is a maximum permitted value for the named property.

has_min

has_min: bool

True if there is a minimum permitted value for the named property.

integer

integer: bool

When True, the property value is an integer.

is_dropdown_effect

is_dropdown_effect: bool

True if the property is the Menu property of a Dropdown Menu Control effect.

is_effect

is_effect: bool = field(init=False, default=False)

When True, this property is an effect PropertyGroup.

is_mask

is_mask: bool = field(init=False, default=False)

When True, this property is a mask PropertyGroup.

is_modified

is_modified: bool

True if the property value differs from its default.

A property is considered modified when it has keyframes, has an enabled expression, or when its current value differs from default_value.

is_separation_follower

is_separation_follower: bool

True if the property is a component of a separated multidimensional property (e.g. X Position, Y Position, Z Position).

is_separation_leader

is_separation_leader: bool

True if the property is a multidimensional property that can be separated.

is_spatial

is_spatial: bool

When True, the named property defines a spatial value. Examples are position and effect point controls.

is_time_varying

is_time_varying: bool

True if the named property has keyframes or an enabled expression.

keyframes

keyframes: list[Keyframe]

The list of keyframes for this property.

last_value

last_value: Any = None

The last value of the property (before animation).

locked_ratio

locked_ratio: bool

When True, the property's X/Y ratio is locked.

match_name

match_name: str

A special name for the property used to build unique naming paths. The match name is not displayed, but you can refer to it in scripts. Every property has a unique match-name identifier.

max_value

max_value: Any = None

The maximum permitted value of the named property. Only valid if has_max is True.

min_value

min_value: Any = None

The minimum permitted value of the named property. Only valid if has_min is True.

name

name: str

Display name of the property.

nb_options

nb_options: int | None = None

The number of options in a dropdown property.

no_value

no_value: bool

When True, the property stores no data.

num_keys

num_keys: int

The number of keyframes in the named property. If the value is 0, the property is not being keyframed.

Note

Equivalent to len(self.keyframes).

parent_property

parent_property: PropertyGroup | None = field(
    init=False, default=None, repr=False
)

The parent PropertyGroup of this property, or None for top-level layer property groups.

property_control_type

property_control_type: PropertyControlType

The type of effect control (scalar, color, enum, etc.) for this property.

property_depth

property_depth: int

The number of levels of parent groups between this property and the containing layer. The value is 0 for a layer.

property_index

property_index: int | None

The 0-based position of this property within its parent group.

Returns None for layers (property depth 0).

Warning

Unlike ExtendScript (1-based), this uses Python's 0-based convention so that group.properties[prop.property_index] works directly.

property_parameters

property_parameters: list[str] | None = None

An array of all item strings in a dropdown menu property. This attribute applies to dropdown menu properties of effects and layers, including custom strings in the Menu property of the Dropdown Menu Control.

property_type

property_type: PropertyType = field(
    init=False, default=NAMED_GROUP
)

The type of this property. One of PropertyType.PROPERTY, PropertyType.NAMED_GROUP, or PropertyType.INDEXED_GROUP.

property_value_type

property_value_type: PropertyValueType

The type of value stored in the named property. Each type of data is stored and retrieved in a different kind of structure. For example, a 3D spatial property (such as a layer's position) is stored as an array of three floating-point values.

selected

selected: bool = field(init=False, default=False)

When True, the property is selected.

separation_dimension

separation_dimension: int | None

For a separated follower, the dimension it represents.

Returns 0, 1, or 2 for X, Y, or Z. Returns None for properties that are not separation followers.

separation_leader

separation_leader: Property | None

For a separation follower, the leader property.

Returns the Property that acts as the separation leader (e.g. Position) for this follower (e.g. X Position). Returns None when this property is not a follower or the leader cannot be found.

units_text

units_text: str

The text description of the units in which the value is expressed.

Common values include "pixels", "degrees", "percent", "seconds", and "dB". An empty string indicates the property has no specific unit.

value

value: Any

The value of the named property at the current time. If expression_enabled is True, returns the evaluated expression value. If there are keyframes, returns the keyframed value at the current time. Otherwise, returns the static value.

vector

vector: bool

When True, the property value is a vector.

Functions

get_separation_follower

get_separation_follower(dim: int) -> Property | None

Retrieve a specific follower property for a separated, multidimensional property.

For example, you can use this method on the Position property to access the separated X Position and Y Position properties.

Parameters:

  • dim
    (int) –

    The dimension number (starting at 0).

key_in_interpolation_type

key_in_interpolation_type(
    key_index: int,
) -> KeyframeInterpolationType

Returns the "in" interpolation type for the specified keyframe.

Note

Equivalent to self.keyframes[key_index].in_interpolation_type.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_in_spatial_tangent

key_in_spatial_tangent(
    key_index: int,
) -> list[float] | None

Returns the incoming spatial tangent for the specified keyframe, if the named property is spatial (that is, the value type is TwoD_SPATIAL or ThreeD_SPATIAL).

Note

Equivalent to self.keyframes[key_index].in_spatial_tangent.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_in_temporal_ease

key_in_temporal_ease(key_index: int) -> list[KeyframeEase]

Returns the incoming temporal ease for the specified keyframe.

Note

Equivalent to self.keyframes[key_index].in_temporal_ease.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_label

key_label(key_index: int) -> Label

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

Note

Equivalent to self.keyframes[key_index].label.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_out_interpolation_type

key_out_interpolation_type(
    key_index: int,
) -> KeyframeInterpolationType

Returns the outgoing interpolation type for the specified keyframe.

Note

Equivalent to self.keyframes[key_index].out_interpolation_type.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_out_spatial_tangent

key_out_spatial_tangent(
    key_index: int,
) -> list[float] | None

Returns the outgoing spatial tangent for the specified keyframe.

Note

Equivalent to self.keyframes[key_index].out_spatial_tangent.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_out_temporal_ease

key_out_temporal_ease(key_index: int) -> list[KeyframeEase]

Returns the outgoing temporal ease for the specified keyframe.

Note

Equivalent to self.keyframes[key_index].out_temporal_ease.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_roving

key_roving(key_index: int) -> bool

Returns True if the specified keyframe is roving. The first and last keyframe in a property cannot rove.

Note

Equivalent to self.keyframes[key_index].roving.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_spatial_auto_bezier

key_spatial_auto_bezier(key_index: int) -> bool

Returns True if the specified keyframe has spatial auto-Bezier interpolation. This type of interpolation affects this keyframe only if key_spatial_continuous is also True.

Note

Equivalent to self.keyframes[key_index].spatial_auto_bezier.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_spatial_continuous

key_spatial_continuous(key_index: int) -> bool

Returns True if the specified keyframe has spatial continuity.

Note

Equivalent to self.keyframes[key_index].spatial_continuous.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_temporal_auto_bezier

key_temporal_auto_bezier(key_index: int) -> bool

Returns True if the specified keyframe has temporal auto-Bezier interpolation. Temporal auto-Bezier interpolation affects this keyframe only if the keyframe interpolation type is KeyframeInterpolationType.BEZIER for both key_in_interpolation_type and key_out_interpolation_type.

Note

Equivalent to self.keyframes[key_index].temporal_auto_bezier.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_temporal_continuous

key_temporal_continuous(key_index: int) -> bool

Returns True if the specified keyframe has temporal continuity. Temporal continuity affects this keyframe only if the keyframe interpolation type is KeyframeInterpolationType.BEZIER for both key_in_interpolation_type and key_out_interpolation_type.

Note

Equivalent to self.keyframes[key_index].temporal_continuous.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_time

key_time(key_index: int) -> float

Returns the time at which the specified keyframe occurs.

Note

Equivalent to self.keyframes[key_index].time.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

key_value

key_value(
    key_index: int,
) -> (
    list[float]
    | float
    | MarkerValue
    | Shape
    | TextDocument
    | None
)

Returns the current value of the specified keyframe.

Note

Equivalent to self.keyframes[key_index].value.

Parameters:

  • key_index
    (int) –

    The index for the keyframe.

nearest_key

nearest_key(time: float) -> Keyframe

Returns the keyframe nearest to the specified time.

Parameters:

  • time
    (float) –

    The time in seconds; a floating-point value. The beginning of the composition is 0.

nearest_key_index

nearest_key_index(time: float) -> int

Returns the index of the keyframe nearest to the specified time.

Parameters:

  • time
    (float) –

    The time in seconds; a floating-point value. The beginning of the composition is 0.

value_at_time

value_at_time(
    time: float, pre_expression: bool = True
) -> (
    list[float]
    | float
    | MarkerValue
    | Shape
    | TextDocument
    | None
)

Get the value of the named property at the given time.

If the property has keyframes, the value is computed by interpolating between surrounding keyframes using the stored interpolation type and temporal ease.

If the property is not animated, returns the static value.

Parameters:

  • time
    (float) –

    The composition time in seconds at which to evaluate the property.

  • pre_expression
    (bool, default: True ) –

    When True the value is evaluated before any expression is applied (the only mode supported by the parser).

Raises:

  • NotImplementedError

    If pre_expression is False, because the parser cannot evaluate expressions.