python-lottie  0.6.7+devab2519b
A framework to work with lottie files and telegram animated stickers (tgs)
Lottie

Objects of the lottie file structure. More...

Collaboration diagram for Lottie:

Classes

class  lottie.objects.animation.Animation
 Top level object, describing the animation. More...
 
class  lottie.objects.assets.Asset
 
class  lottie.objects.assets.Image
 External image. More...
 
class  lottie.objects.assets.CharacterData
 Character shapes. More...
 
class  lottie.objects.assets.Chars
 Defines character shapes to avoid loading system fonts. More...
 
class  lottie.objects.assets.Precomp
 
class  lottie.objects.bezier.Bezier
 Single bezier curve. More...
 
class  lottie.objects.composition.Composition
 Base class for layer holders. More...
 
class  lottie.objects.easing.KeyframeBezierHandle
 Bezier handle for keyframe interpolation. More...
 
class  lottie.objects.effects.Effect
 Layer effect. More...
 
class  lottie.objects.effects.EffectNoValue
 
class  lottie.objects.effects.EffectValueSlider
 
class  lottie.objects.effects.EffectValueAngle
 
class  lottie.objects.effects.EffectValueColor
 
class  lottie.objects.effects.EffectValuePoint
 
class  lottie.objects.effects.EffectValueCheckbox
 
class  lottie.objects.effects.IgnoredValue
 
class  lottie.objects.effects.EffectValueDropDown
 
class  lottie.objects.effects.EffectValueLayer
 
class  lottie.objects.effects.FillEffect
 Replaces the whole layer with the given color. More...
 
class  lottie.objects.effects.StrokeEffect
 
class  lottie.objects.effects.TritoneEffect
 Maps layers colors based on bright/mid/dark colors. More...
 
class  lottie.objects.effects.ProLevelsEffect
 
class  lottie.objects.effects.TintEffect
 Colorizes the layer. More...
 
class  lottie.objects.effects.DropShadowEffect
 Adds a shadow to the layer. More...
 
class  lottie.objects.effects.Matte3Effect
 
class  lottie.objects.effects.GaussianBlurEffect
 Gaussian blur. More...
 
class  lottie.objects.effects.ChangeToColorEffect
 Change to color. More...
 
class  lottie.objects.enums.TestBased
 
class  lottie.objects.enums.TextShape
 
class  lottie.objects.enums.TextGrouping
 
class  lottie.objects.helpers.Transform
 Layer transform. More...
 
class  lottie.objects.helpers.MaskMode
 How masks interact with each other. More...
 
class  lottie.objects.helpers.Mask
 
class  lottie.objects.layers.BlendMode
 
class  lottie.objects.layers.MatteMode
 
class  lottie.objects.layers.Layer
 
class  lottie.objects.layers.NullLayer
 Layer with no data, useful to group layers together. More...
 
class  lottie.objects.layers.TextLayer
 
class  lottie.objects.layers.ShapeLayer
 Layer containing ShapeElement objects. More...
 
class  lottie.objects.layers.ImageLayer
 
class  lottie.objects.layers.PreCompLayer
 
class  lottie.objects.layers.SolidColorLayer
 Layer with a solid color rectangle. More...
 
class  lottie.objects.properties.Keyframe
 
class  lottie.objects.properties.OffsetKeyframe
 Keyframe for MultiDimensional values. More...
 
class  lottie.objects.properties.MultiDimensional
 An animatable property that holds a NVector. More...
 
class  lottie.objects.properties.GradientColors
 Represents colors and offsets in a gradient. More...
 
class  lottie.objects.properties.Value
 An animatable property that holds a float. More...
 
class  lottie.objects.properties.ShapePropKeyframe
 Keyframe holding Bezier objects. More...
 
class  lottie.objects.properties.ShapeProperty
 An animatable property that holds a Bezier. More...
 
class  lottie.objects.shapes.ShapeElement
 Base class for all elements of ShapeLayer and Group. More...
 
class  lottie.objects.shapes.Shape
 Drawable shape. More...
 
class  lottie.objects.shapes.Rect
 A simple rectangle shape. More...
 
class  lottie.objects.shapes.StarType
 
class  lottie.objects.shapes.Star
 Star shape. More...
 
class  lottie.objects.shapes.Ellipse
 Ellipse shape. More...
 
class  lottie.objects.shapes.Path
 Animatable Bezier curve. More...
 
class  lottie.objects.shapes.Group
 ShapeElement that can contain other shapes. More...
 
class  lottie.objects.shapes.FillRule
 
class  lottie.objects.shapes.Fill
 Solid fill color. More...
 
class  lottie.objects.shapes.GradientType
 
class  lottie.objects.shapes.Gradient
 
class  lottie.objects.shapes.GradientFill
 Gradient fill. More...
 
class  lottie.objects.shapes.LineJoin
 
class  lottie.objects.shapes.LineCap
 
class  lottie.objects.shapes.StrokeDashType
 
class  lottie.objects.shapes.StrokeDash
 
class  lottie.objects.shapes.BaseStroke
 
class  lottie.objects.shapes.Stroke
 Solid stroke. More...
 
class  lottie.objects.shapes.GradientStroke
 Gradient stroke. More...
 
class  lottie.objects.shapes.TransformShape
 Group transform. More...
 
class  lottie.objects.shapes.Composite
 
class  lottie.objects.shapes.RepeaterTransform
 
class  lottie.objects.shapes.Modifier
 
class  lottie.objects.shapes.TrimMultipleShapes
 
class  lottie.objects.shapes.Trim
 
class  lottie.objects.shapes.Repeater
 
class  lottie.objects.shapes.RoundedCorners
 
class  lottie.objects.shapes.Merge
 
class  lottie.objects.shapes.Twist
 
class  lottie.objects.text.MaskedPath
 
class  lottie.objects.text.TextAnimatorDataProperty
 
class  lottie.objects.text.TextMoreOptions
 
class  lottie.objects.text.TextJustify
 
class  lottie.objects.text.TextDocument
 
class  lottie.objects.text.TextDataKeyframe
 
class  lottie.objects.text.TextData
 
class  lottie.objects.text.TextAnimatorData
 
class  lottie.objects.text.FontPathOrigin
 
class  lottie.objects.text.Font
 
class  lottie.objects.text.FontList
 

Detailed Description

Objects of the lottie file structure.

Lottie JSON Format

Index

Animation

Python class: Animation
Top level object, describing the animation
See also
http://docs.aenhancers.com/items/compitem/
Lottie name Type Description Attribute
layers list of Layer List of Composition Layers.   layers
v str Bodymovin Version.   version
fr float Frames per second.   frame_rate
ip float The time when the composition work area begins, in frames.   in_point
op float The time when the composition work area ends.   out_point
w int Composition Width.   width
h int Composition Height.   height
nm str Composition name.   name
ddd 0-1 int Composition has 3-D layers.   threedimensional
assets list of Asset source items that can be used in multiple places.   assets
fonts FontList Available fonts.   fonts
chars list of Chars source chars for text layers   chars

Asset

Python class: Asset
Base class for mapping Python classes into Lottie JSON objects
Subclasses:

CharacterData

Python class: CharacterData
Character shapes
Lottie name Type Description Attribute
shapes list of ShapeElement   shapes

Chars

Python class: Chars
Defines character shapes to avoid loading system fonts
Lottie name Type Description Attribute
ch str Character Value.   character
fFamily str Character Font Family.   font_family
size float Character Font Size.   font_size
style str Character Font Style.   font_style
w float Character Width.   width
data CharacterData Character Data.   data

Image

Python class: Image
External image
See also
http://docs.aenhancers.com/sources/filesource/
Lottie name Type Description Attribute
h float Image Height.   height
w float Image Width.   width
id str Image ID.   id
p str Image name.   image
u str Image path.   image_path
e 0-1 int Image data is stored as a data: url.   is_embedded

Precomp

Python class: Precomp
Base class for layer holders
Lottie name Type Description Attribute
layers list of Layer List of Composition Layers.   layers
id str Precomp ID.   id

Bezier

Python class: Bezier
Single bezier curve
Lottie name Type Description Attribute
c bool Closed property of shape.   closed
i list of list of float Cubic bezier handles for the segments before each vertex.   in_tangents
o list of list of float Cubic bezier handles for the segments after each vertex.   out_tangents
v list of list of float Bezier curve vertices.   vertices

Composition

Python class: Composition
Base class for layer holders
Subclasses:
Lottie name Type Description Attribute
layers list of Layer List of Composition Layers.   layers

KeyframeBezierHandle

Python class: KeyframeBezierHandle
Bezier handle for keyframe interpolation
Lottie name Type Description Attribute
x float or list of float x position of the handle.   x
y float or list of float y position of the handle.   y

ChangeToColorEffect

Python class: ChangeToColorEffect
Change to color
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 5 Effect type.   type
ef list of EffectValue Effect parameters. [from_color, to_color, change, change_by, tolerance, hue, lightness, saturation, saturation_, softness, view_correction]   effects

DropShadowEffect

Python class: DropShadowEffect
Adds a shadow to the layer
Note
Opacity is in [0, 255]
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 25 Effect type.   type
ef list of EffectValue Effect parameters. [color, opacity, angle, distance, blur]   effects

Effect

Python class: Effect
Layer effect
Subclasses:
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int Effect type.   type
ef list of EffectValue Effect parameters. []   effects

EffectNoValue

Python class: EffectNoValue
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int Effect value type.   type

EffectValue

Python class: EffectValue
Value for an effect
Subclasses:
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int Effect value type.   type

EffectValueAngle

Python class: EffectValueAngle
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 1 Effect type.   type
v Value Effect value.   value

EffectValueCheckbox

Python class: EffectValueCheckbox
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 4 Effect type.   type
v Value Effect value.   value

EffectValueColor

Python class: EffectValueColor
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 2 Effect type.   type
v ColorValue Effect value.   value

EffectValueDropDown

Python class: EffectValueDropDown
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 7 Effect type.   type
v Value Effect value.   value

EffectValueLayer

Python class: EffectValueLayer
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 10 Effect type.   type
v Value Effect value.   value

EffectValuePoint

Python class: EffectValuePoint
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 3 Effect type.   type
v MultiDimensional Effect value.   value

EffectValueSlider

Python class: EffectValueSlider
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 0 Effect type.   type
v Value Effect value.   value

FillEffect

Python class: FillEffect
Replaces the whole layer with the given color
Note
Opacity is in [0, 1]
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 21 Effect type.   type
ef list of EffectValue Effect parameters. [00, 01, color, 03, 04, 05, opacity]   effects

GaussianBlurEffect

Python class: GaussianBlurEffect
Gaussian blur
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 29 Effect type.   type
ef list of EffectValue Effect parameters. [sigma, dimensions, wrap]   effects

IgnoredValue

Python class: IgnoredValue
Value for an effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 6 Effect type.   type
v float Effect value.   value

Matte3Effect

Python class: Matte3Effect
Layer effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 28 Effect type.   type
ef list of EffectValue Effect parameters. [index]   effects

ProLevelsEffect

Python class: ProLevelsEffect
Layer effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 24 Effect type.   type
ef list of EffectValue Effect parameters. [00, 01, 02, comp_inblack, comp_inwhite, comp_gamma, comp_outblack, comp_outwhite, 08, 09, r_inblack, r_inwhite, r_gamma, r_outblack, r_outwhite, 15, 16, g_inblack, g_inwhite, g_gamma, g_outblack, g_outwhite, 22, b3, b_inblack, b_inwhite, b_gamma, b_outblack, b_outwhite, 29, a_inblack, a_inwhite, a_gamma, a_outblack, a_outwhite]   effects

StrokeEffect

Python class: StrokeEffect
Layer effect
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 22 Effect type.   type
ef list of EffectValue Effect parameters. [00, 01, 02, color, 04, 05, 06, 07, 08, 09, type]   effects

TintEffect

Python class: TintEffect
Colorizes the layer
Note
Opacity is in [0, 100]
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 20 Effect type.   type
ef list of EffectValue Effect parameters. [color_black, color_white, opacity]   effects

TritoneEffect

Python class: TritoneEffect
Maps layers colors based on bright/mid/dark colors
Lottie name Type Description Attribute
ix int Effect Index.   effect_index
nm str After Effect's Name.   name
ty int = 23 Effect type.   type
ef list of EffectValue Effect parameters. [bright, mid, dark]   effects

TestBased

Python class: TestBased
An enumeration.
Lottie Value Name Description Attribute
1 Characters   Characters
2 CharacterExcludingSpaces   CharacterExcludingSpaces
3 Words   Words
4 Lines   Lines

TextGrouping

Python class: TextGrouping
An enumeration.
Lottie Value Name Description Attribute
1 Characters   Characters
2 Word   Word
3 Line   Line
4 All   All

TextShape

Python class: TextShape
An enumeration.
Lottie Value Name Description Attribute
1 Square   Square
2 RampUp   RampUp
3 RampDown   RampDown
4 Triangle   Triangle
5 Round   Round
6 Smooth   Smooth

Mask

Python class: Mask
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
inv bool Inverted Mask flag.   inverted
nm str Mask name.   name
pt ShapeProperty Mask vertices.   shape
o Value Mask opacity.   opacity
mode MaskMode Mask mode.   mode
x Value   dilate

MaskMode

Python class: MaskMode
How masks interact with each other
See also
https://helpx.adobe.com/after-effects/using/alpha-channels-masks-mattes.html
Lottie Value Name Description Attribute
n No   No
a Add   Add
s Subtract   Subtract
i Intersect   Intersect
l Lightent   Lightent
d Darken   Darken
f Difference   Difference

Transform

Python class: Transform
Layer transform
Subclasses:
Lottie name Type Description Attribute
a MultiDimensional Transform Anchor Point.   anchor_point
p PositionValue Transform Position.   position
s MultiDimensional Transform Scale.   scale
r Value Transform Rotation.   rotation
o Value Transform Opacity.   opacity
sk Value Transform Skew.   skew
sa Value Transform Skew Axis.   skew_axis

BlendMode

Python class: BlendMode
An enumeration.
Lottie Value Name Description Attribute
0 Normal   Normal
1 Multiply   Multiply
2 Screen   Screen
3 Overlay   Overlay
4 Darken   Darken
5 Lighten   Lighten
6 ColorDodge   ColorDodge
7 ColorBurn   ColorBurn
8 HardLight   HardLight
9 SoftLight   SoftLight
10 Difference   Difference
11 Exclusion   Exclusion
12 Hue   Hue
13 Saturation   Saturation
14 Color   Color
15 Luminosity   Luminosity

ImageLayer

Python class: ImageLayer
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int = 2 Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target
refId str id pointing to the source image defined on 'assets' object   image_id

Layer

Python class: Layer
Base class for mapping Python classes into Lottie JSON objects
Subclasses:
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target

MatteMode

Python class: MatteMode
An enumeration.
Lottie Value Name Description Attribute
0 Normal   Normal
1 Alpha   Alpha
2 InvertedAlpha   InvertedAlpha
3 Luma   Luma
4 InvertedLuma   InvertedLuma

NullLayer

Python class: NullLayer
Layer with no data, useful to group layers together
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int = 3 Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target

PreCompLayer

Python class: PreCompLayer
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int = 0 Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target
refId str id pointing to the source composition defined on 'assets' object   reference_id
tm Value Comp's Time remapping.   time_remapping
w int Width.   width
h int Height.   height

ShapeLayer

Python class: ShapeLayer
Layer containing ShapeElement objects
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int = 4 Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target
shapes list of ShapeElement Shape list of items.   shapes

SolidColorLayer

Python class: SolidColorLayer
Layer with a solid color rectangle
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int = 1 Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target
sc str Color of the layer as a #rrggbb hex.   color
sh float Height of the layer.   height
sw float Width of the layer.   width

TextLayer

Python class: TextLayer
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
ddd 0-1 int 3d layer flag   threedimensional
hd bool Hidden layer.   hidden
ty int = 5 Layer type.   type
nm str After Effects Layer Name.   name
parent int Layer Parent.   parent_index
sr float Layer Time Stretching.   stretch
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
ip float In Point of layer.   in_point
op float Out Point of layer.   out_point
st float Start Time of layer.   start_time
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
ind int Layer index in AE.   index
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
td int   matte_target
t TextAnimatorData Text Data.   data

ColorValue

Python class: ColorValue
An animatable property that holds a Color
Lottie name Type Description Attribute
k Color Non-animated value.   value
ix int Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of OffsetKeyframe Keyframe list.   keyframes

GradientColors

Python class: GradientColors
Represents colors and offsets in a gradient

Colors are represented as a flat list interleaving offsets and color components in weird ways There are two possible layouts:

Without alpha, the colors are a sequence of offset, r, g, b

With alpha, same as above but at the end of the list there is a sequence of offset, alpha

Examples:

For the gradient [0, red], [0.5, yellow], [1, green] The list would be [0, 1, 0, 0, 0.5, 1, 1, 0, 1, 0, 1, 0]

For the gradient [0, red at 80% opacity], [0.5, yellow at 70% opacity], [1, green at 60% opacity] The list would be [0, 1, 0, 0, 0.5, 1, 1, 0, 1, 0, 1, 0, 0, 0.8, 0.5, 0.7, 1, 0.6]

Lottie name Type Description Attribute
k MultiDimensional Animatable colors, as a vector containing [offset, r, g, b] values as a flat array.   colors
p int Number of colors.   count

Keyframe

Python class: Keyframe
Base class for mapping Python classes into Lottie JSON objects
Subclasses:
Lottie name Type Description Attribute
t float Start time of keyframe segment.   time
i KeyframeBezierHandle Bezier curve easing in value.   in_value
o KeyframeBezierHandle Bezier curve easing out value.   out_value
h 0-1 int Jump to the end value.   jump

MultiDimensional

Python class: MultiDimensional
An animatable property that holds a NVector
Subclasses:
Lottie name Type Description Attribute
k list of float Non-animated value.   value
ix int Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of OffsetKeyframe Keyframe list.   keyframes

OffsetKeyframe

Python class: OffsetKeyframe
Keyframe for MultiDimensional values
Bezier easing

Imagine a quadratic bezier, with starting point at (0, 0) and end point at (1, 1).

out_value and in_value are the other two handles for a quadratic bezier, expressed as absoulte values in this 0-1 space.

See also https://cubic-bezier.com/

Lottie name Type Description Attribute
t float Start time of keyframe segment.   time
i KeyframeBezierHandle Bezier curve easing in value.   in_value
o KeyframeBezierHandle Bezier curve easing out value.   out_value
h 0-1 int Jump to the end value.   jump
s list of float Start value of keyframe segment.   start
e list of float End value of keyframe segment.   end
ti list of float In Spatial Tangent.   in_tan
to list of float Out Spatial Tangent.   out_tan

PositionValue

Python class: PositionValue
An animatable property that holds a NVector
Lottie name Type Description Attribute
k list of float Non-animated value.   value
ix int Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of OffsetKeyframe Keyframe list.   keyframes
k list of float Non-animated value.   value
ix int Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of OffsetKeyframe Keyframe list.   keyframes

ShapePropKeyframe

Python class: ShapePropKeyframe
Keyframe holding Bezier objects
Lottie name Type Description Attribute
t float Start time of keyframe segment.   time
i KeyframeBezierHandle Bezier curve easing in value.   in_value
o KeyframeBezierHandle Bezier curve easing out value.   out_value
h 0-1 int Jump to the end value.   jump
s Bezier or list of Bezier Start value of keyframe segment.   start
e Bezier or list of Bezier End value of keyframe segment.   end

ShapeProperty

Python class: ShapeProperty
An animatable property that holds a Bezier
Lottie name Type Description Attribute
k Bezier Non-animated value.   value
ix float Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of ShapePropKeyframe Keyframe list.   keyframes

Value

Python class: Value
An animatable property that holds a float
Lottie name Type Description Attribute
k float Non-animated value.   value
ix int Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of OffsetKeyframe Keyframe list.   keyframes

BaseStroke

Python class: BaseStroke
Base class for mapping Python classes into Lottie JSON objects
Subclasses:
Lottie name Type Description Attribute
lc LineCap Stroke Line Cap.   line_cap
lj LineJoin Stroke Line Join.   line_join
ml float Stroke Miter Limit.   miter_limit
o Value Stroke Opacity.   opacity
w Value Stroke Width.   width
d list of StrokeDash Dashes.   dashes

Composite

Python class: Composite
An enumeration.
Lottie Value Name Description Attribute
1 Above   Above
2 Below   Below

Ellipse

Python class: Ellipse
Ellipse shape
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'el' Shape type.   type
cix int Property index.   property_index
bm int   bm
d float After Effect's Direction.   direction
p MultiDimensional Ellipse's position.   position
s MultiDimensional Ellipse's size.   size

Fill

Python class: Fill
Solid fill color
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'fl' Shape type.   type
cix int Property index.   property_index
bm int   bm
o Value Fill Opacity.   opacity
c ColorValue Fill Color.   color
r FillRule Fill rule.   fill_rule

FillRule

Python class: FillRule
An enumeration.
Lottie Value Name Description Attribute
1 NonZero   NonZero
2 EvenOdd   EvenOdd

Gradient

Python class: Gradient
Base class for mapping Python classes into Lottie JSON objects
Subclasses:
Lottie name Type Description Attribute
s MultiDimensional Gradient Start Point.   start_point
e MultiDimensional Gradient End Point.   end_point
t GradientType Gradient Type.   gradient_type
h Value Gradient Highlight Length.   highlight_length
a Value Highlight Angle.   highlight_angle
g GradientColors Gradient Colors.   colors

GradientFill

Python class: GradientFill
Gradient fill
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'gf' Shape type.   type
cix int Property index.   property_index
bm int   bm
s MultiDimensional Gradient Start Point.   start_point
e MultiDimensional Gradient End Point.   end_point
t GradientType Gradient Type.   gradient_type
h Value Gradient Highlight Length.   highlight_length
a Value Highlight Angle.   highlight_angle
g GradientColors Gradient Colors.   colors
o Value Fill Opacity.   opacity
r FillRule Fill rule.   fill_rule

GradientStroke

Python class: GradientStroke
Gradient stroke
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'gs' Shape type.   type
cix int Property index.   property_index
bm int   bm
lc LineCap Stroke Line Cap.   line_cap
lj LineJoin Stroke Line Join.   line_join
ml float Stroke Miter Limit.   miter_limit
o Value Fill Opacity.   opacity
w Value Stroke Width.   width
d list of StrokeDash Dashes.   dashes
s MultiDimensional Gradient Start Point.   start_point
e MultiDimensional Gradient End Point.   end_point
t GradientType Gradient Type.   gradient_type
h Value Gradient Highlight Length.   highlight_length
a Value Highlight Angle.   highlight_angle
g GradientColors Gradient Colors.   colors

GradientType

Python class: GradientType
An enumeration.
Lottie Value Name Description Attribute
1 Linear   Linear
2 Radial   Radial

Group

Python class: Group
ShapeElement that can contain other shapes
Note
Shapes inside the same group will create "holes" in other shapes
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'gr' Shape type.   type
cix int Property index.   property_index
bm int   bm
np float Group number of properties.   number_of_properties
it list of ShapeElement Group list of items.   shapes

LineCap

Python class: LineCap
An enumeration.
Lottie Value Name Description Attribute
1 Butt   Butt
2 Round   Round
3 Square   Square

LineJoin

Python class: LineJoin
An enumeration.
Lottie Value Name Description Attribute
1 Miter   Miter
2 Round   Round
3 Bevel   Bevel

Merge

Python class: Merge
Base class for all elements of ShapeLayer and Group
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'mm' Shape type.   type
cix int Property index.   property_index
bm int   bm
mm float Merge Mode.   merge_mode

Modifier

Python class: Modifier
Base class for all elements of ShapeLayer and Group
Subclasses:
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str Shape type.   type
cix int Property index.   property_index
bm int   bm

Path

Python class: Path
Animatable Bezier curve
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'sh' Shape type.   type
cix int Property index.   property_index
bm int   bm
d float After Effect's Direction.   direction
ks ShapeProperty Shape's vertices.   shape
ind int   index

Rect

Python class: Rect
A simple rectangle shape
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'rc' Shape type.   type
cix int Property index.   property_index
bm int   bm
d float After Effect's Direction.   direction
p MultiDimensional Rect's position.   position
s MultiDimensional Rect's size.   size
r Value Rect's rounded corners.   rounded

Repeater

Python class: Repeater
Duplicates previous shapes in a group
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'rp' Shape type.   type
cix int Property index.   property_index
bm int   bm
c Value Number of Copies.   copies
o Value Offset of Copies.   offset
m Composite Composite of copies.   composite
tr RepeaterTransform Transform values for each repeater copy.   transform

RepeaterTransform

Python class: RepeaterTransform
Layer transform
Lottie name Type Description Attribute
a MultiDimensional Transform Anchor Point.   anchor_point
p PositionValue Transform Position.   position
s MultiDimensional Transform Scale.   scale
r Value Transform Rotation.   rotation
o Value Transform Opacity.   opacity
sk Value Transform Skew.   skew
sa Value Transform Skew Axis.   skew_axis
so Value   start_opacity
eo Value   end_opacity

RoundedCorners

Python class: RoundedCorners
Rounds corners of other shapes
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'rd' Shape type.   type
cix int Property index.   property_index
bm int   bm
r Value Rounded Corner Radius.   radius

Shape

Python class: Shape
Drawable shape
Subclasses:
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str Shape type.   type
cix int Property index.   property_index
bm int   bm
d float After Effect's Direction.   direction

ShapeElement

Python class: ShapeElement
Base class for all elements of ShapeLayer and Group
Subclasses:
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str Shape type.   type
cix int Property index.   property_index
bm int   bm

Star

Python class: Star
Star shape
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'sr' Shape type.   type
cix int Property index.   property_index
bm int   bm
d float After Effect's Direction.   direction
p MultiDimensional Star's position.   position
ir Value Star's inner radius.   inner_radius
is Value Star's inner roundness.   inner_roundness
or Value Star's outer radius.   outer_radius
os Value Star's outer roundness.   outer_roundness
r Value Star's rotation.   rotation
pt Value Star's number of points.   points
sy StarType Star's type.   star_type

StarType

Python class: StarType
An enumeration.
Lottie Value Name Description Attribute
1 Star   Star
2 Polygon   Polygon

Stroke

Python class: Stroke
Solid stroke
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'st' Shape type.   type
cix int Property index.   property_index
bm int   bm
lc LineCap Stroke Line Cap.   line_cap
lj LineJoin Stroke Line Join.   line_join
ml float Stroke Miter Limit.   miter_limit
o Value Stroke Opacity.   opacity
w Value Stroke Width.   width
d list of StrokeDash Dashes.   dashes
c MultiDimensional Stroke Color.   color

StrokeDash

Python class: StrokeDash
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
nm str   name
n StrokeDashType   type
v Value   length

StrokeDashType

Python class: StrokeDashType
An enumeration.
Lottie Value Name Description Attribute
d Dash   Dash
g Gap   Gap
o Offset   Offset

TransformShape

Python class: TransformShape
Group transform
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'tr' Shape type.   type
cix int Property index.   property_index
bm int   bm
a MultiDimensional   anchor_point
p PositionValue Transform Position.   position
s MultiDimensional Transform Scale.   scale
r Value Transform Rotation.   rotation
o Value Transform Opacity.   opacity
sk Value Transform Skew.   skew
sa Value Transform Skew Axis.   skew_axis

Trim

Python class: Trim
Trims shapes into a segment
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'tm' Shape type.   type
cix int Property index.   property_index
bm int   bm
s Value Start of the segment, as a percentage.   start
e Value End of the segment, as a percentage.   end
o Value start/end offset, as an angle (0, 360)   offset
m TrimMultipleShapes   multiple

TrimMultipleShapes

Python class: TrimMultipleShapes
An enumeration.
Lottie Value Name Description Attribute
1 Simultaneously   Simultaneously
2 Individually   Individually

Twist

Python class: Twist
Base class for all elements of ShapeLayer and Group
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'tw' Shape type.   type
cix int Property index.   property_index
bm int   bm
a Value   angle
c MultiDimensional   center

Font

Python class: Font
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
ascent float   ascent
fFamily str   font_family
fName str   name
fStyle str   font_style
fPath str   path
fWeight str   weight
origin FontPathOrigin   origin

FontList

Python class: FontList
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
list list of Font   list

FontPathOrigin

Python class: FontPathOrigin
An enumeration.
Lottie Value Name Description Attribute
0 Unknown   Unknown
1 CssUrl   CssUrl
2 ScriptUrl   ScriptUrl
3 FontUrl   FontUrl

MaskedPath

Python class: MaskedPath
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
m float Type?   mask
f Value First?   f
l Value Last?   l
r float ??   r

TextAnimatorData

Python class: TextAnimatorData
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
a list of TextAnimatorDataProperty   properties
d TextData   data
m TextMoreOptions   more_options
p MaskedPath   masked_path

TextAnimatorDataProperty

Python class: TextAnimatorDataProperty
Layer transform
Lottie name Type Description Attribute
a MultiDimensional Transform Anchor Point.   anchor_point
p PositionValue Transform Position.   position
s MultiDimensional Transform Scale.   scale
r Value Transform Rotation.   rotation
o Value Transform Opacity.   opacity
sk Value Transform Skew.   skew
sa Value Transform Skew Axis.   skew_axis
rx Value Angle?   rx
ry Value Angle?   ry
sw Value Stroke width.   stroke_width
sc MultiDimensional Stroke color.   stroke_color
fc MultiDimensional Fill color.   fill_color
fh Value   fh
fs Value 0-100?   fs
fb Value 0-100?   fb
t Value Tracking.   tracking
s MultiDimensional Transform Scale.   scale

TextData

Python class: TextData
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
k list of TextDataKeyframe   keyframes

TextDataKeyframe

Python class: TextDataKeyframe
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
s TextDocument Start value of keyframe segment.   start
t float Start time of keyframe segment.   time

TextDocument

Python class: TextDocument
See also
http://docs.aenhancers.com/other/textdocument/

Note that for multi-line text, lines are separated by \r

Lottie name Type Description Attribute
f str   font_family
fc list of float Text color.   color
s float Font Size.   font_size
lh float Line height when wrapping.   line_height
sz list of float Size of the box containing the text.   wrap_size
t str Text.   text
j TextJustify Text alignment.   justify

TextJustify

Python class: TextJustify
An enumeration.
Lottie Value Name Description Attribute
0 Left   Left
1 Right   Right
2 Center   Center

TextMoreOptions

Python class: TextMoreOptions
Base class for mapping Python classes into Lottie JSON objects
Lottie name Type Description Attribute
a MultiDimensional   alignment
g float   g