Spine Animation Asset Parser Library
Spine 动画资源解析库
This Python library implements Spine skeleton parsing. Note that the library does not support rendering, as it is just designed for parsing purpose.
Spine Version | Skeleton Binary Parsing | Skeleton JSON Parsing | Atlas Parsing |
---|---|---|---|
3.8 | √ Yes | √ Yes | √ Yes |
Install from PyPI:
pip install spine_asset
The following code shows how to parse a binary skeleton file:
from spine_asset.v38 import SkeletonBinary
path = "path/to/your/skeleton/file.skel"
with open(path, "rb") as f:
skeleton_data = SkeletonBinary().read_skeleton_data(f.read())
print("This skeleton contains these animations:")
print([a.name for a in skeleton_data.animations])
If the skeleton file is in JSON format, just change all the SkeletonBinary
to SkeletonJSON
.
This project is licensed under the MIT License. See the License file for more details.