wgt01: real .mdl/.wok export via Neverblender
Neverblender is installed + enabled in this machine's Blender 4.0.2 config and confirmed working headless via the flake. Add generator/export_mdl.py: assembles each tile as a Neverblender-native model (AuroraBase dummy/tile, trimesh, single aabb walkmesh) in its own scene and calls scene.nvb_mdlexport to emit real ASCII <resref>.mdl + <resref>.wok for all 40 tiles. Walkmesh surfacemats via create_wok_materials() slot order (walkable Stone=4, Nonwalk=7) -> verified correct per tile (CP1 all 4, CN1 all 7, BR_1/CE_S mixed). flake.nix: add `export` app (nix run .#export -- <blend> <outdir> [CODE...]). AGENTS.md: record the Neverblender node/surfacemat facts and the kit's tools; note the slot-index (not material-name) surfacemat gotcha. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,20 @@
|
||||
runtimeInputs = [ py ];
|
||||
text = ''exec python ${gen}/make_wok.py "$@"'';
|
||||
};
|
||||
|
||||
# Real .mdl + .wok export via the Neverblender addon (must be enabled in
|
||||
# this Blender's user config — confirmed working headless).
|
||||
mkmdl = pkgs.writeShellApplication {
|
||||
name = "wgt-export";
|
||||
runtimeInputs = [ blender ];
|
||||
text = ''
|
||||
blend="''${1:?usage: wgt-export <blend> <outdir> [CODE...]}"
|
||||
outdir="''${2:-mdl}"
|
||||
shift 2 || true
|
||||
exec blender-4.0.2 --background "$blend" --python ${gen}/export_mdl.py \
|
||||
--python-exit-code 1 -- "$outdir" "$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.default = build;
|
||||
@@ -65,6 +79,10 @@
|
||||
type = "app";
|
||||
program = "${mkwok}/bin/wgt-wok";
|
||||
};
|
||||
export = {
|
||||
type = "app";
|
||||
program = "${mkmdl}/bin/wgt-export";
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
Reference in New Issue
Block a user