Keyframe
Keyframe
¶
Keyframe(
frame_time: int,
in_interpolation_type: KeyframeInterpolationType,
in_spatial_tangent: list[float] | None,
in_temporal_ease: list[KeyframeEase],
label: Label,
out_interpolation_type: KeyframeInterpolationType,
out_spatial_tangent: list[float] | None,
out_temporal_ease: list[KeyframeEase],
roving: bool,
spatial_auto_bezier: bool,
spatial_continuous: bool,
temporal_auto_bezier: bool,
temporal_continuous: bool,
time: float,
value: list[float]
| float
| MarkerValue
| Shape
| TextDocument
| None,
)
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¶
in_interpolation_type
¶
in_interpolation_type: KeyframeInterpolationType
The "in" interpolation type for the keyframe.
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: 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).
out_interpolation_type
¶
out_interpolation_type: KeyframeInterpolationType
The "out" interpolation type for the keyframe.
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
¶
roving: bool
True if the keyframe is roving. The first and last keyframe in
a property cannot rove.
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
¶
temporal_auto_bezier: bool
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.
temporal_continuous
¶
temporal_continuous: bool
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.
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.