mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1486] glb_inspect: count animation weights per mesh morph target #1515
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1515
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1486
Author: @xel1uz
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/glb-inspect-morph-weight-count📝 Commits (2)
1548519glb_inspect: count animation weights per mesh morph target89b4e9eMerge branch 'ubiquitarianism:main' into fix/glb-inspect-morph-weight-count📊 Changes
2 files changed (+103 additions, -7 deletions)
View changed files
📝
tests/test_glb_inspect.py(+68 -0)📝
tools/glb_inspect.py(+35 -7)📄 Description
Claimed in the coordination issue as: GLB-INSPECT-MORPH-WEIGHT-COUNT
What and why
Running
python -I tools/glb_inspect.py AnimatedMorphCube.glb --json report.jsonon the Khronos sample reports a count error on upstreamb4b7756e8c64. The animation has 127 keys and two morph targets, so all 254 scalar weights belong there. The old check also accepts an underfilled stream when its length happens to match what a single target would need.The inspector now resolves each weight channel's target mesh and checks the packed scalar count against its morph target count. LINEAR and STEP store one weight per target per key. CUBICSPLINE stores three per target per key. Checking the channel also identifies which mesh is incompatible when a sampler is shared. glTF 2.0 animation spec
Tested
issuesarray.python -I tests/test_glb_inspect.py -k test_morph_weightexercises eight CLI cases. All eight failed their assertions on the original implementation and passed after the fix. The fixtures cover valid and short streams for all three interpolation modes, a shared sampler, and a mesh with a static primitive before the animated one.ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_COUNTfor all three underfilled fixtures.python -I tests/test_glb_inspect.py -von Windows and Ubuntu (WSL). Each ran 39 tests with one platform-specific skip and no failures.python -I scripts/check_no_game_data.py tools/glb_inspect.py tests/test_glb_inspect.pyandgit diff --checkpassed.python -I scripts/run_semantic_tests.py tests/semantic -j 12ran 6,223 tests across 476 files in 407 s with zero failing files.GPUs tested: N/A (CPU-only GLB inspection).
AI-assisted: Yes.
Checklist
main(cc22b7d4fd).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.