Asset referencing a file.
More...
|
def | __init__ (self) |
|
def | data (self) |
|
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...
|
|
def | clone_into (self, other) |
|
def | __str__ (self) |
|
def | __new__ (cls, name, bases, attr) |
|
Asset referencing a file.
- Lottie JSON
Lottie name | Type | Description | Attribute |
nm | str | | name |
mn | str | | match_name |
id | str | | id |
u | str | Path to the directory containing a file. | path |
p | str | Filename or data url. | file_name |
e | 0-1 int | Whether the file is embedded. | is_embedded |
Definition at line 31 of file assets.py.
◆ __init__()
def lottie.objects.assets.FileAsset.__init__ |
( |
|
self | ) |
|
◆ data()
def lottie.objects.assets.FileAsset.data |
( |
|
self | ) |
|
Returns a tuple (format, data) with the contents of the file
`format` is a string like "png", and `data` is just raw binary data.
If it's impossible to fetch this info, returns (None, None)
Definition at line 62 of file assets.py.
◆ file_name
lottie.objects.assets.FileAsset.file_name |
Filename or data url.
Definition at line 47 of file assets.py.
◆ id
lottie.objects.assets.FileAsset.id |
◆ is_embedded
lottie.objects.assets.FileAsset.is_embedded |
Whether the file is embedded.
Definition at line 49 of file assets.py.
◆ path
lottie.objects.assets.FileAsset.path |
Path to the directory containing a file.
Definition at line 45 of file assets.py.
The documentation for this class was generated from the following file: