python-lottie  0.6.10+dev4166086
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.animation.Animation Class Reference

Top level object, describing the animation. More...

Inheritance diagram for lottie.objects.animation.Animation:
[legend]
Collaboration diagram for lottie.objects.animation.Animation:
[legend]

Public Member Functions

def __init__ (self, n_frames=60, framerate=60)
 
def precomp (self, name)
 
def tgs_sanitize (self)
 Cleans up some things to ensure it works as a telegram sticker. More...
 
def __str__ (self)
 
- Public Member Functions inherited from lottie.objects.composition.Composition
def __init__ (self)
 
def layer (self, index)
 
def add_layer (self, Layer layer)
 Appends a layer to the composition. More...
 
def load (cls, lottiedict)
 Loads from a JSON object. More...
 
def insert_layer (self, index, Layer layer)
 Inserts a layer to the composition. More...
 
def prepare_layer (self, Layer layer)
 
def clone (self)
 Returns a copy of the object. More...
 
def remove_layer (self, Layer layer)
 Removes a layer (and all of its children) from this composition. More...
 
- Public Member Functions inherited from lottie.objects.base.LottieObject
def to_dict (self)
 Serializes into a JSON object fit for the Lottie format. More...
 
def find (self, search, propname="name")
 Recursively searches for child objects with a matching property. More...
 
def find_all (self, type, predicate=None, include_self=True)
 Find all child objects that match a predicate. More...
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)
 

Public Attributes

 in_point
 The time when the composition work area begins, in frames. More...
 
 out_point
 The time when the composition work area ends. More...
 
 frame_rate
 Frames per second. More...
 
 width
 Composition Width. More...
 
 threedimensional
 Composition has 3-D layers. More...
 
 height
 Composition Height. More...
 
 version
 Bodymovin Version. More...
 
 name
 Composition name. More...
 
 assets
 source items that can be used in multiple places. More...
 
 chars
 source chars for text layers More...
 
 fonts
 Available fonts. More...
 
- Public Attributes inherited from lottie.objects.composition.Composition
 layers
 List of Composition Layers. More...
 

Detailed Description

Top level object, describing the animation.

See also
http://docs.aenhancers.com/items/compitem/
Lottie JSON
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

Definition at line 36 of file animation.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.animation.Animation.__init__ (   self,
  n_frames = 60,
  framerate = 60 
)

Definition at line 60 of file animation.py.

Member Function Documentation

◆ __str__()

def lottie.objects.animation.Animation.__str__ (   self)

Reimplemented from lottie.objects.base.LottieObject.

Definition at line 141 of file animation.py.

◆ precomp()

def lottie.objects.animation.Animation.precomp (   self,
  name 
)

Definition at line 86 of file animation.py.

◆ tgs_sanitize()

def lottie.objects.animation.Animation.tgs_sanitize (   self)

Cleans up some things to ensure it works as a telegram sticker.

Definition at line 98 of file animation.py.

Member Data Documentation

◆ assets

lottie.objects.animation.Animation.assets

source items that can be used in multiple places.

Comps and Images for now.

Definition at line 80 of file animation.py.

◆ chars

lottie.objects.animation.Animation.chars

source chars for text layers

Definition at line 82 of file animation.py.

◆ fonts

lottie.objects.animation.Animation.fonts

Available fonts.

Definition at line 84 of file animation.py.

◆ frame_rate

lottie.objects.animation.Animation.frame_rate

Frames per second.

Definition at line 68 of file animation.py.

◆ height

lottie.objects.animation.Animation.height

Composition Height.

Definition at line 74 of file animation.py.

◆ in_point

lottie.objects.animation.Animation.in_point

The time when the composition work area begins, in frames.

Definition at line 63 of file animation.py.

◆ name

lottie.objects.animation.Animation.name

Composition name.

Definition at line 78 of file animation.py.

◆ out_point

lottie.objects.animation.Animation.out_point

The time when the composition work area ends.

Sets the final Frame of the animation

Definition at line 66 of file animation.py.

◆ threedimensional

lottie.objects.animation.Animation.threedimensional

Composition has 3-D layers.

Definition at line 72 of file animation.py.

◆ version

lottie.objects.animation.Animation.version

Bodymovin Version.

Definition at line 76 of file animation.py.

◆ width

lottie.objects.animation.Animation.width

Composition Width.

Definition at line 70 of file animation.py.


The documentation for this class was generated from the following file: