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
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¶
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.
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
¶
When True, the property is not shown in the UI. An elided property is
still present in the timeline but hidden from view.
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.
is_dropdown_effect
¶
is_dropdown_effect: bool
True if the property is the Menu property of a Dropdown Menu Control effect.
is_effect
¶
When True, this property is an effect PropertyGroup.
is_mask
¶
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.
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.
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
¶
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.
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.
Functions¶
get_separation_follower
¶
key_in_interpolation_type
¶
key_in_interpolation_type(
key_index: int,
) -> KeyframeInterpolationType
key_in_spatial_tangent
¶
key_in_temporal_ease
¶
key_in_temporal_ease(key_index: int) -> list[KeyframeEase]
key_label
¶
key_out_interpolation_type
¶
key_out_interpolation_type(
key_index: int,
) -> KeyframeInterpolationType
key_out_spatial_tangent
¶
key_out_temporal_ease
¶
key_out_temporal_ease(key_index: int) -> list[KeyframeEase]
key_roving
¶
key_spatial_auto_bezier
¶
key_spatial_continuous
¶
key_temporal_auto_bezier
¶
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_temporal_continuous
¶
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_time
¶
key_value
¶
key_value(
key_index: int,
) -> (
list[float]
| float
| MarkerValue
| Shape
| TextDocument
| None
)
nearest_key
¶
nearest_key_index
¶
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
Truethe 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.