Keyframe
Keyframe
¶
The Keyframe object represents a keyframe of a property.
Example
Warning
Keyframe object does not exist in ExtendScript API. It has been added
for convenience.
Attributes¶
frame_time
¶
frame_time: int
Time of the keyframe, in composition frames.
The binary stores times relative to the layer's start.
The _frame_offset on the owning Property shifts the
value to composition time.
in_interpolation_type
¶
in_interpolation_type = enum(
KeyframeInterpolationType,
"_ldat_item",
"in_interpolation_type",
)
The "in" interpolation type for the keyframe. Read / Write.
in_spatial_tangent
¶
The incoming spatial tangent for the keyframe, if the named
property is spatial (that is, the value type is TwoD_SPATIAL or
ThreeD_SPATIAL).
- If the property value type is
PropertyValueType.TwoD_SPATIAL, the list contains 2 floating-point values. - If the property value type is
PropertyValueType.ThreeD_SPATIAL, the list contains 3 floating-point values. - If the property value type is neither of these types, returns
None.
in_temporal_ease
¶
in_temporal_ease: list[KeyframeEase]
The incoming temporal ease for the keyframe.
Array of KeyframeEase objects:
- If the property value type is PropertyValueType.TwoD, the list
contains 2 objects.
- If the property value type is PropertyValueType.ThreeD, the list
contains 3 objects.
- For any other value type, the list contains 1 object.
label
¶
label = enum(Label, '_ldat_item', '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). Read / Write.
out_interpolation_type
¶
out_interpolation_type = enum(
KeyframeInterpolationType,
"_ldat_item",
"out_interpolation_type",
)
The "out" interpolation type for the keyframe. Read / Write.
out_spatial_tangent
¶
The outgoing spatial tangent for the keyframe, if the named
property is spatial (that is, the value type is TwoD_SPATIAL or
ThreeD_SPATIAL).
- If the property value type is
PropertyValueType.TwoD_SPATIAL, the list contains 2 floating-point values. - If the property value type is
PropertyValueType.ThreeD_SPATIAL, the list contains 3 floating-point values. - If the property value type is neither of these types, returns
None.
out_temporal_ease
¶
out_temporal_ease: list[KeyframeEase]
The outgoing temporal ease for the keyframe.
Array of KeyframeEase objects:
- If the property value type is PropertyValueType.TwoD, the list
contains 2 objects.
- If the property value type is PropertyValueType.ThreeD, the list
contains 3 objects.
- For any other value type, the list contains 1 object.
roving
¶
True if the keyframe is roving. The first and last keyframe in
a property cannot rove. Read / Write.
spatial_auto_bezier
¶
spatial_auto_bezier: bool
True if the keyframe has spatial auto-Bezier interpolation. This type
of interpolation affects this keyframe only if spatial_continuous is
also True. If the property value type is neither TwoD_SPATIAL nor
ThreeD_SPATIAL, the value is False.
spatial_continuous
¶
spatial_continuous: bool
True if the keyframe has spatial continuity. If the property value
type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, the value is
False.
temporal_auto_bezier
¶
True if the keyframe has temporal auto-Bezier interpolation. Temporal
auto-Bezier interpolation affects this keyframe only if the keyframe
interpolation type is KeyframeInterpolationType.BEZIER for both
in_interpolation_type and out_interpolation_type. Read / Write.
temporal_continuous
¶
True if the keyframe has temporal continuity. Temporal continuity affects
this keyframe only if the keyframe interpolation type is
KeyframeInterpolationType.BEZIER for both in_interpolation_type and
out_interpolation_type. Read / Write.
value
¶
value: (
list[float]
| float
| MarkerValue
| Shape
| TextDocument
| None
)
The value of the keyframe. For a 1D property (e.g. Opacity, Rotation),
this is a single float. For a multi-dimensional property (e.g.
Position, Scale), this is a list[float]. For shape/mask path
properties, this is a Shape. For text properties, this is a
TextDocument. For marker properties, this is a MarkerValue.
For properties that carry no value, this is None.