anim_glb: bind weighted bones outside the skeleton as extra rest-pose joints (OLD-10043) #1221

Open
github-bot wants to merge 1 commit from github-bot/gh-1221 into main AGit
Owner

@⁠IlyassRS3 on GitHub · 2026-11-24 20:30 UTC · original
IlyassRS3:carry/old-10043-anim-glb-extra-joints → main · +95 −5 · 3 files · 1 commits · open

Claimed in the coordination issue as: OLD-10043 (#14)

What and why

Carries forward old-pr/10043 (draft #308, indexed in #17), preserving @tedin7's original commit rebased onto current main.

Clothing parts whose weighted cloth or accessory bones are not listed in the master skeleton were previously refused whole by tools/anim_glb.py. extend_joints() now appends one extra rest-pose joint bone_0x<hash> per weighted unknown bone hash (sorted deterministically, skipping zero-weight bones and keeping earlier joint indices stable across parts), parented under the skeleton's first root with an identity local transform and the root's inverse bind matrix so the rest pose stays exact while clip tracks naming the hash can still drive it. Documents the behavior in docs/character_skeleton.md and covers it in tests/test_anim_glb.py.

Tested

  • python3 -I tests/test_anim_glb.py -v on macOS 27.2.1 / Apple M5 (Python 3.14): 38/38 passed (including tools/glb_skinning.py validation on the exported multi-part GLB).
  • Verified regression proof: reverting tools/anim_glb.py to main causes the new tests in tests/test_anim_glb.py to fail as expected.
  • python3 -m compileall -q make_game.py tools tests, scripts/check_no_game_data.py, tests/test_ci_registration.py, tests/test_text_write_line_endings.py, and all 11 tests/test_docs_*.py: all passed.
  • Verified zero conflict (git apply --check) against open PR #1084.

GPUs tested: n/a (CPU asset/GLB tooling, no GPU or game files)

AI-assisted: yes (carry-forward rebase, audit, and verification of @tedin7's commit)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠IlyassRS3** on GitHub · 2026-11-24 20:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1221) `IlyassRS3:carry/old-10043-anim-glb-extra-joints` → `main` · +95 −5 · 3 files · 1 commits · open Claimed in the coordination issue as: OLD-10043 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Carries forward `old-pr/10043` (draft `#308`, indexed in `#17`), preserving `@tedin7`'s original commit rebased onto current `main`. Clothing parts whose weighted cloth or accessory bones are not listed in the master skeleton were previously refused whole by `tools/anim_glb.py`. `extend_joints()` now appends one extra rest-pose joint `bone_0x<hash>` per weighted unknown bone hash (sorted deterministically, skipping zero-weight bones and keeping earlier joint indices stable across parts), parented under the skeleton's first root with an identity local transform and the root's inverse bind matrix so the rest pose stays exact while clip tracks naming the hash can still drive it. Documents the behavior in `docs/character_skeleton.md` and covers it in `tests/test_anim_glb.py`. ### Tested - `python3 -I tests/test_anim_glb.py -v` on macOS 27.2.1 / Apple M5 (Python 3.14): **38/38 passed** (including `tools/glb_skinning.py` validation on the exported multi-part GLB). - Verified regression proof: reverting `tools/anim_glb.py` to `main` causes the new tests in `tests/test_anim_glb.py` to fail as expected. - `python3 -m compileall -q make_game.py tools tests`, `scripts/check_no_game_data.py`, `tests/test_ci_registration.py`, `tests/test_text_write_line_endings.py`, and all 11 `tests/test_docs_*.py`: all passed. - Verified zero conflict (`git apply --check`) against open PR `#1084`. GPUs tested: n/a (CPU asset/GLB tooling, no GPU or game files) AI-assisted: yes (carry-forward rebase, audit, and verification of `@tedin7`'s commit) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
A clothing part whose weighted cloth or accessory bones are not in the master skeleton was refused whole. Each such hash now becomes a joint bone_0x<hash> under the skeleton root with identity local transform and the root's inverse bind, so the rest pose is unchanged; clips can still drive it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:43:24 +00:00
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-24 20:30 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-24 20:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1221#pullrequestreview-6046890432) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1221/head:github-bot/gh-1221'
git switch 'github-bot/gh-1221'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1221'
git switch 'github-bot/gh-1221'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1221'
git switch 'github-bot/gh-1221'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1221'
git switch 'main'
git merge --squash 'github-bot/gh-1221'
git switch 'main'
git merge --ff-only 'github-bot/gh-1221'
git switch 'main'
git merge 'github-bot/gh-1221'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.