Blender plugin for League of Legends asset import/export, using league-toolkit.
NOTE: This plugin is extremely early in development, see io_scene_lol for a more developed importer/exporter.
| ✅ | 🚨 | 🛠️ | |
|---|---|---|---|
| Supported | Partial support | Broken | Planned |
| Import | Export | |
|---|---|---|
| Skinned Mesh (.skn) | ✅1 | |
| Skeleton (.skl) | ✅ | |
| Animation (.anm) | 🛠️ | 🛠️ |
| Static mesh (.sco/.scb) | 🛠️ | 🛠️ |
| Map geometry (.mapgeo) | 🛠️ | 🛠️ |
- Git
- Python
- Rust
- Maturin (see their install guide here)
- uv
- VSCode with the Blender Development Addon
- Blender
-
Clone the repository:
git clone git@github.com:alanpq/lol-blender.git cd lol-blender -
Compile the
rust_wrapcrate:cd crates/rust_wrap maturin build --release --out ../../addon/wheels/ -
Take note of the output from your
maturincommand (it might differ in your case!):<...> 📦 Built wheel for CPython 3.11 to ../../addon/wheels/rust_wrap-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whlMake sure it's listed in the
blender_manifest.toml:wheels = [ "./wheels/rust_wrap-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl", "<...>", "<...>", ]
-
Compile the
rust_hotcrate (this is the step you'll typically repeat later):cd crates/rust_hot cargo build --release -
Open the repository in VSCode, open the Command Palette (
Ctrl+Shift+P), search for "Blender: Start", and select your Blender executable (mean the one you've installed prior).
Important
Verify that the VSCode terminal shows: creating new rust context
For the Python parts of the extension (UI and such), use the VSCode addon: "Blender: Reload Addons" in the Command Palette.
Recompile the rust_hot crate for changes in the rust_core crate:
cd crates/rust_hot/
cargo build --releaseNote
We're editing rust_core but recompiling rust_hot.
For changes in the rust_api or rust_hot crates themselves, hot reloading isn’t possible with this approach.
You'll need to:
- Rebuild
rust_wrapwithmaturinas before. - Recompile
rust_hot. - Unload the extension and restart Blender.
When preparing for distribution, do not use hot reloading.
-
Compile the
rust_wrapcrate without default features:cd crates/rust_wrap/ maturin build --release --no-default-features --out ../../addon/wheels/ -
No additional Rust steps apply in this case.
-
Build the extension via Blender directly:
cd addon/ blender --command extension build
RuntimeError: Error: No module named 'rust_wrap'
Indicates a missing or incorrect path to the wheel.
pyo3_runtime.PanicException: failed to create hot reload loader: LibraryLoadError(DlOpen { desc: "<...> (no such file)" })
or
pyo3_runtime.PanicException: failed to create hot reload loader: LibraryCopyError(Custom { kind: NotFound, error: "file <...>" does not exist" })
Indicates the dynamic library for hot reloading is missing.
Make sure rust_hot is built with:
cargo build [--release](Release/debug builds of the wrap and core crates must match.)
pyo3_runtime.PanicException: Once instance has previously been poisoned
Means the reloader thread has failed.
Disable the extension and restart Blender.
Thanks to Algebraic UG for their work on Blender extensions with hot reloadable Rust parts, from which this project heavily takes from.
Footnotes
-
Automatic texture import not yet implemented. (Materials/UV's are imported though, so textures can be manually hooked up) ↩