python-lottie  0.6.10+dev4166086
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.layers.Layer Class Reference
Inheritance diagram for lottie.objects.layers.Layer:
[legend]
Collaboration diagram for lottie.objects.layers.Layer:
[legend]

Public Member Functions

def has_masks (self)
 Whether the layer has some masks applied. More...
 
def __init__ (self)
 
def add_child (self, layer)
 
def parent (self)
 
def parent (self, layer)
 
def children (self)
 
def __repr__ (self)
 
def __str__ (self)
 
def remove (self)
 Removes this layer from the componsitin. 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 load (cls, lottiedict)
 Loads from a JSON object. 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...
 
def clone (self)
 Returns a copy of the object. More...
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)
 

Public Attributes

 transform
 Transform properties. More...
 
 auto_orient
 Auto-Orient along path AE property. More...
 
 threedimensional
 3d layer flag More...
 
 hidden
 Hidden layer. More...
 
 index
 Layer index in AE. More...
 
 in_point
 In Point of layer. More...
 
 out_point
 Out Point of layer. More...
 
 start_time
 Start Time of layer. More...
 
 name
 After Effects Layer Name. More...
 
 effects
 List of Effects. More...
 
 stretch
 Layer Time Stretching. More...
 
 parent_index
 Layer Parent. More...
 
 masks
 List of Masks. More...
 
 blend_mode
 Blend Mode. More...
 
 matte_mode
 Matte mode, the layer will inherit the transparency from the layer above. More...
 
 matte_target
 
 composition
 Composition owning the layer, set by add_layer. More...
 

Static Public Attributes

 type = None
 Layer type. More...
 

Detailed Description

Lottie JSON
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

Definition at line 41 of file layers.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.layers.Layer.__init__ (   self)

Member Function Documentation

◆ __repr__()

def lottie.objects.layers.Layer.__repr__ (   self)

Definition at line 168 of file layers.py.

◆ __str__()

def lottie.objects.layers.Layer.__str__ (   self)

Reimplemented from lottie.objects.base.LottieObject.

Definition at line 171 of file layers.py.

◆ add_child()

def lottie.objects.layers.Layer.add_child (   self,
  layer 
)

Definition at line 121 of file layers.py.

◆ children()

def lottie.objects.layers.Layer.children (   self)

Definition at line 150 of file layers.py.

◆ has_masks()

def lottie.objects.layers.Layer.has_masks (   self)

Whether the layer has some masks applied.

Definition at line 73 of file layers.py.

◆ parent() [1/2]

def lottie.objects.layers.Layer.parent (   self)

Definition at line 136 of file layers.py.

◆ parent() [2/2]

def lottie.objects.layers.Layer.parent (   self,
  layer 
)

Definition at line 142 of file layers.py.

◆ remove()

def lottie.objects.layers.Layer.remove (   self)

Removes this layer from the componsitin.

Definition at line 177 of file layers.py.

Member Data Documentation

◆ auto_orient

lottie.objects.layers.Layer.auto_orient

Auto-Orient along path AE property.

Definition at line 83 of file layers.py.

◆ blend_mode

lottie.objects.layers.Layer.blend_mode

Blend Mode.

Definition at line 114 of file layers.py.

◆ composition

lottie.objects.layers.Layer.composition

Composition owning the layer, set by add_layer.

Definition at line 119 of file layers.py.

◆ effects

lottie.objects.layers.Layer.effects

List of Effects.

Definition at line 106 of file layers.py.

◆ hidden

lottie.objects.layers.Layer.hidden

Hidden layer.

Definition at line 87 of file layers.py.

◆ in_point

lottie.objects.layers.Layer.in_point

In Point of layer.

Sets the initial frame of the layer.

Definition at line 98 of file layers.py.

◆ index

lottie.objects.layers.Layer.index

Layer index in AE.

Used for parenting and expressions.

Definition at line 89 of file layers.py.

◆ masks

lottie.objects.layers.Layer.masks

List of Masks.

Definition at line 112 of file layers.py.

◆ matte_mode

lottie.objects.layers.Layer.matte_mode

Matte mode, the layer will inherit the transparency from the layer above.

Definition at line 116 of file layers.py.

◆ matte_target

lottie.objects.layers.Layer.matte_target

Definition at line 117 of file layers.py.

◆ name

lottie.objects.layers.Layer.name

After Effects Layer Name.

Used for expressions.

Definition at line 104 of file layers.py.

◆ out_point

lottie.objects.layers.Layer.out_point

Out Point of layer.

Sets the final frame of the layer.

Definition at line 100 of file layers.py.

◆ parent_index

lottie.objects.layers.Layer.parent_index

Layer Parent.

Uses ind of parent.

Definition at line 110 of file layers.py.

◆ start_time

lottie.objects.layers.Layer.start_time

Start Time of layer.

Sets the start time of the layer.

Definition at line 102 of file layers.py.

◆ stretch

lottie.objects.layers.Layer.stretch

Layer Time Stretching.

Definition at line 108 of file layers.py.

◆ threedimensional

lottie.objects.layers.Layer.threedimensional

3d layer flag

Definition at line 85 of file layers.py.

◆ transform

lottie.objects.layers.Layer.transform

Transform properties.

Definition at line 81 of file layers.py.

◆ type

lottie.objects.layers.Layer.type = None
static

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