Lottie <-> Python property mapper.
More...
|
def | __init__ (self, name, lottie, type=float, list=False, cond=None) |
|
def | get (self, obj) |
| Returns the value of the property from a Python object. More...
|
|
def | set (self, obj, value) |
| Sets the value of the property from a Python object. More...
|
|
def | load_from_parent (self, lottiedict) |
| Returns the value for this property from a JSON dict representing the parent object. More...
|
|
def | load_into (self, lottiedict, obj) |
| Loads from a Lottie dict into an object. More...
|
|
def | load (self, lottieval) |
| Loads the property from a JSON value. More...
|
|
def | to_dict (self, obj) |
| Converts the value of the property as from obj into a JSON value. More...
|
|
def | __repr__ (self) |
|
def | clone_value (self, value) |
|
Lottie <-> Python property mapper.
Definition at line 88 of file base.py.
◆ __init__()
def lottie.objects.base.LottieProp.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
lottie, |
|
|
|
type = float , |
|
|
|
list = False , |
|
|
|
cond = None |
|
) |
| |
◆ __repr__()
def lottie.objects.base.LottieProp.__repr__ |
( |
|
self | ) |
|
◆ clone_value()
def lottie.objects.base.LottieProp.clone_value |
( |
|
self, |
|
|
|
value |
|
) |
| |
◆ get()
def lottie.objects.base.LottieProp.get |
( |
|
self, |
|
|
|
obj |
|
) |
| |
Returns the value of the property from a Python object.
Definition at line 106 of file base.py.
◆ load()
def lottie.objects.base.LottieProp.load |
( |
|
self, |
|
|
|
lottieval |
|
) |
| |
Loads the property from a JSON value.
- Returns
- the Python equivalent of the JSON value
Definition at line 137 of file base.py.
◆ load_from_parent()
def lottie.objects.base.LottieProp.load_from_parent |
( |
|
self, |
|
|
|
lottiedict |
|
) |
| |
Returns the value for this property from a JSON dict representing the parent object.
- Returns
- The loaded value or
None
if the property is not in lottiedict
Definition at line 120 of file base.py.
◆ load_into()
def lottie.objects.base.LottieProp.load_into |
( |
|
self, |
|
|
|
lottiedict, |
|
|
|
obj |
|
) |
| |
Loads from a Lottie dict into an object.
Definition at line 129 of file base.py.
◆ set()
def lottie.objects.base.LottieProp.set |
( |
|
self, |
|
|
|
obj, |
|
|
|
value |
|
) |
| |
Sets the value of the property from a Python object.
Definition at line 112 of file base.py.
◆ to_dict()
def lottie.objects.base.LottieProp.to_dict |
( |
|
self, |
|
|
|
obj |
|
) |
| |
Converts the value of the property as from obj
into a JSON value.
- Parameters
-
Definition at line 168 of file base.py.
◆ cond
lottie.objects.base.LottieProp.cond |
Condition on when the property is loaded from the Lottie JSON.
Definition at line 104 of file base.py.
◆ list
lottie.objects.base.LottieProp.list |
Whether the property is a list of self.type.
- See also
- PseudoList
Definition at line 102 of file base.py.
◆ lottie
lottie.objects.base.LottieProp.lottie |
Name of the Lottie JSON property.
Definition at line 96 of file base.py.
◆ name
lottie.objects.base.LottieProp.name |
Name of the Python property.
Definition at line 94 of file base.py.
◆ type
lottie.objects.base.LottieProp.type |
The documentation for this class was generated from the following file: