Live2D Python SDK
Project description
live2d-py
使用 Python 直接加载和操作 Live2D 模型,不通过 Web Engine 等间接手段进行渲染,提供更高的自由度和拓展性。
基于 Python C++ API 对 Live2D Native SDK (C++) 进行了封装。理论上,只要配置好 OpenGL 上下文,可在 Python 中将 live2d 绘制在任何基于 OpenGL 的窗口。
代码使用示例:package
详细使用文档:https://arkueid.github.io/live2d-py-docs/
支持UI库
理论上支持所有能使用 OpenGL 进行绘制的UI库:PyQt5 / PySide2 / PySide6 / GLFW / FreeGlut / Qfluentwidgets ...
基本操作
- 加载模型
- 鼠标拖拽视线
- 鼠标点击触发动作
- 动作播放回调函数
- 口型同步
- 模型各部分参数控制
平台支持
live2d-py |
支持的live2d模型 | 支持的Python版本 | 支持平台 |
---|---|---|---|
live2d.v2 |
Cubism 2.1 以及更早的版本 | 仅 32 位,支持Python 3.0 及以上版本,但除 Python 3.10.11 外需要自行编译 |
Windows |
live2d.v3 |
Cubism 3.0 及以上版本 | 支持 32 / 64 位,支持Python 3.0 及以上版本,但除 Python 3.12 外需要自行编译 |
Windows、Linux |
注:
- Cubism 2.X 导出的模型:文件名格式常为
XXX.moc
,XXX.model.json
,XXX.mtn
- Cubism 3.0 及以上导出的模型:文件名格式常为
XXX.moc3
,XXX.model3.json
,XXX.motion3.json
- 对于 Cubism 2.0 模型,网络上能找到的现存 live2d opengl 静态库只有 32 位,因此只能使用 32 位 Python 解释器加载。
安装方式
通过 PyPi 安装
pip install live2d-py
在发行版中下载源码进行构建安装
pip install live2d_py-0.2.2.tar.gz
在发行版中下载对应版本的 whl
文件并安装
pip install live2d_py-0.2.2-cp310-cp310-win32.whl
克隆本仓库,自行编译构建,参考 安装/编译
简易面部动捕示例
源码见 main_facial_bind_mediapipe.py
基于 live2d-py + qfluentwidgets 实现的桌面应用预览
贡献
感谢 @96bearli 为本项目提供的帮助和支持。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file live2d_py-0.2.4.tar.gz
.
File metadata
- Download URL: live2d_py-0.2.4.tar.gz
- Upload date:
- Size: 22.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb093285a1b3f3fc515eee8a14a0da923e4634ae7afe975a70cdde4fc9634f7 |
|
MD5 | 90417a87c664df76435756d4742f347f |
|
BLAKE2b-256 | a126e153015310b12135a1ec8c3385836e3e2e0d09d8fc60bef23c905328c8bd |
File details
Details for the file live2d_py-0.2.4-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0786216f228826a6083249cdb6c6382f46b1eb2975b8492167646ebaf61602b |
|
MD5 | db00874efce9c25e9d4295cb16ba8a7d |
|
BLAKE2b-256 | 855b7a640bc651d912a4d480a851101d6e902fd5c3029dcaaa4a0a91cd7d5924 |
File details
Details for the file live2d_py-0.2.4-cp312-cp312-win32.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp312-cp312-win32.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81baac6b75877786be13e8dc65b8b0461dac6fd048558ac4542e9cdfcfae2c2e |
|
MD5 | 9faaab24d748a6711ce45b1e6b45a3e1 |
|
BLAKE2b-256 | 9fbf825ee0dc2d01e6f34c3d1f5aec94e51e6b81d1c525897c60e88a28bdb82f |
File details
Details for the file live2d_py-0.2.4-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a05096c4e9e3a4e43bb9596d271debff3b47d9b8d703a07b584ec8b4a87f1fca |
|
MD5 | 649e411df0f8f6eec66eef8262f46ff1 |
|
BLAKE2b-256 | 3add2220452f0400f7e32f229f3308a3e12925f891ab199b8b0caaebaccf19b7 |
File details
Details for the file live2d_py-0.2.4-cp311-cp311-win32.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp311-cp311-win32.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dd2d85d33abfc6246c7e354733726a8efc2b21425a744ce290f17ed1cdc67f5 |
|
MD5 | 19c6a34ee77a3bffdbf754441558f78d |
|
BLAKE2b-256 | 2c049de50646641c1dd3cca268e1d7f6e955ca6c3d86e3fcecb4f268e605baa5 |
File details
Details for the file live2d_py-0.2.4-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a31c41fbebd36bdbfd3b43b325cbd807fc042fb9116468c6ea0199f984edf55 |
|
MD5 | 4bbcf497760083f74c52705b1ae72678 |
|
BLAKE2b-256 | c9d06fb6a497e9c86d807a65ececbf1a5f336aa0c7f915db833e06366157b2bb |
File details
Details for the file live2d_py-0.2.4-cp310-cp310-win32.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp310-cp310-win32.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 555d16ba18ad320530c14edb29397b13e5aecbb4a5fba948d899a7d3650717aa |
|
MD5 | 026e5ffaa5ce6b8efc602669ddfd41fd |
|
BLAKE2b-256 | 53e98a54de9abb43c5fc7c2375a4d71656c9feb3e639b4a33b7cc9492bd6e273 |
File details
Details for the file live2d_py-0.2.4-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a964417ddbcfeaf848587c178c85e5a8cea8a97906c1789c271196d04a0e6ae3 |
|
MD5 | dc40c5aa3832682b7fad0d16b442cd76 |
|
BLAKE2b-256 | 20f572e13f321da8aa5a50e7efad9bf9e8d2a8f840a59357b5342e9fa4a83526 |
File details
Details for the file live2d_py-0.2.4-cp39-cp39-win32.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp39-cp39-win32.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ec1ad5048699af2ccbd5ed08abdceb2adfaab4565238983be5753eb68912dca |
|
MD5 | acc2bc35a30e952cf2569e93c3f1cf3a |
|
BLAKE2b-256 | bfcfc85f9709f4d6299e50eb762cd928095fe098f315168d9573a847c3f452c2 |
File details
Details for the file live2d_py-0.2.4-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 288.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ff193d8849dac3cd382bb2b931ee873df8300287b461f789c06b7af81adc323 |
|
MD5 | 51293f63e0ee95bd4c5616c0183dfb0a |
|
BLAKE2b-256 | 90e0f0a46b270e7bcbd465f9ebd6bc3871a2ab72094b41a3e41c3885d50285c1 |
File details
Details for the file live2d_py-0.2.4-cp38-cp38-win32.whl
.
File metadata
- Download URL: live2d_py-0.2.4-cp38-cp38-win32.whl
- Upload date:
- Size: 249.2 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 540bf38d7fefdaa7e9ac40b1426792c3eb7002c84cd95d1d2f5d1b80de8138bf |
|
MD5 | f631c9f949253e3ac3c33ce302f5b15d |
|
BLAKE2b-256 | 98666bcafed83d295e69ff3bcdf98e6adbba7f95c7bd852e136949a77991cf05 |