glb_inspect: show the default scene and named root nodes #1746
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1746"
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?
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-25T11:04:03Z.
Claimed in the coordination issue as: GLB-INSPECT-SCENE-ROOTS
What and why
The scene count alone does not show which scene a viewer opens or which roots it contains. Both report formats now give the declared default and each scene's ordered root indices and names. Broken references are reported alongside their scene. An omitted default stays unspecified. glTF scene schema
Tested
Two synthetic tests cover an omitted and nonzero default scene, declared root order, node names, absent and empty root arrays, duplicate roots and references to missing or non-object entries.
python -I tests/test_glb_inspect.pyon Windows with Python 3.14.7 ran 38 tests on this branch with one platform skip. The new tests also failed against the original inspector.python -I scripts/check_no_game_data.py tools/glb_inspect.py tests/test_glb_inspect.pyandgit diff --checkpassed.bcaa13dapassed 6,287 semantic tests across 488 files.GPUs tested: N/A (CPU-only metadata inspection).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T11:19:50Z.
Review: COMMENTED
Independent check at "
08bbbaef". Windows: 37 tests reported, 1 platform skip. The new default-scene and repeated-reference coverage passes. A separate GLB exposed a hierarchy case that is still reported as a valid root. Details inline.AI-assisted review and CPU-only testing with synthetic inputs.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T11:19:50Z.
Code review location:
tools/glb_inspect.py; line 117This checks whether the referenced node exists but still reports a child as a valid scene root. With
nodes: [{"children":[1]},{"name":"child"}]andscenes: [{"nodes":[1]}], the JSON shows node 1 under roots with an empty issues list. Could the inspector check root indices against the valid indices found in node children? glTF requires scene root nodes to have no parent. glTF 2.0 scene specificationImported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-27T12:11:40Z.
Code review location:
tools/glb_inspect.py; line 117Fixed:
_scene_report()now collects valid child indices fromnodes[*].childrenand reports an issue whenever a scene root references a child node. Added regression test intests/test_glb_inspect.py.Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-27T15:50:23Z.
Review: COMMENTED
Re-verified at
31868654b(merged cleanly ontomainec91d695c)._scene_report()collects valid node indices fromnodes[*].children, flags child nodes referenced as scene roots, and ignores boolean values inchildrenvia_entry().python -I -B tests/test_glb_inspect.py -vpassed (38 tests, 1 expected Windows POSIX-permission skip);scripts/check_no_game_data.pyandgit diff --checkclean.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T11:38:14Z.
#1746 | head
31868654bc(merged cleanly with main4a54aedcb) |python -I tests/test_glb_inspect.py| red on main:FAILED (errors=3, skipped=6)(KeyErroronscene_issue,default_scene, andscenes) | green on PR+main:39 tests OK (skipped=6)| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_scene_report,build_report, andformat_reportintools/glb_inspect.py(preserving root node order, reportingdefault_sceneandscene_issue, counting non-objectscenesentries ininvalid_counts, and flagging emptynodesarrays, invalid/duplicate root references, and child nodes listed as scene roots). Also verified clean merge (0conflicts) and combined execution with #1747 (40 tests OK (skipped=6)), plustests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T03:13:58Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main
c8bf0e7b6, PR headf0f0c11b2: red 3 errors / green 48 OKpython3.12 -I tests/test_glb_inspect.py(48 tests):git merge-tree).KeyError: 'scenes':test_scene_inventory_preserves_root_order_and_default,test_scene_inventory_identifies_invalid_references,test_scene_root_rejects_child_node.git merge --no-ff): 48 tests OK, 1 skipped (Windows write protection).test_batch_glb20/20 OK,test_report_paths26 OK (1 skipped, Windows-only).invalid_counts; the text report gains ascenes:section without breaking neighbours. Nit: 2 blank lines inside the class beforetest_scene_root_rejects_child_node. No game data.Verdict: READY
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-29T03:37:35Z.
Merging, thank you @kirigayakazima! OreoFR's agent verified this head merged with current main: the test fails on main and passes with the PR (https://github.com/ProjectLeonida/mandy/pull/1746#issuecomment-7249922021), and it still merges cleanly.
AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.