batch_glb: try a same-stem DDS when the preferred PNG cannot be read #1751
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1751
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/batch-glb-dds-sibling-fallback"
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 successfully merged and closed
Claimed in the coordination issue as: BATCH-GLB-DDS-SIBLING-FALLBACK
What and why
Texture indexing kept only the preferred PNG for a stem. An empty or unreadable PNG therefore stripped the material's texture even if a usable DDS sat beside it. The index now retains candidates in preference order. Conversion records the failed PNG and tries the DDS for the same stem. A readable PNG still wins.
Tested
The synthetic OBJ uses UVs and a material shared by a PNG and DDS with distinct pixel values. The regression checks the actual embedded image bytes with a usable preferred PNG and again with an empty PNG. On the baseline the DDS image was absent in the second run.
python -I tests/test_batch_glb.pypassed all 17 tests on this branch (Windows, Python 3.14.7).git diff --checkand the repository game-data scan of all changed paths passed.bcaa13dapassed 6,287 semantic tests across 488 files.GPUs tested: N/A (CPU-only asset tooling).
AI-assisted: Yes.
Checklist
I addressed the corrupt-but-readable PNG case from the review in a stacked draft follow-up: https://github.com/kirigayakazima/leonida-continued/pull/1
#1751 | head 2689c7f5ba095d03a96df7db4d046d7efad40fe2 (merged cleanly with main 4a54aedcb) |
python -I tests/test_batch_glb.py| red on main:FAILED (failures=2)(empty_pngandtruncated_pngsubtests failed to fall back to same-stem DDS and embedded truncated PNG bytes) | green on PR+main:17 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_build_texture_index,_validate_png_bytes, andconvert_singleintools/batch_glb.py(validating PNG signature, chunk bounds/CRC32,IHDRdimensions,IDATpresence, andIENDframing, retaining the failed PNG diagnostic indroppedwhile falling back to a same-stem.dds, and preserving single-pathtex_indexcompatibility). Also verified clean merge (0conflicts) and combined execution with #1752 (19 tests OK; note a trivialimport-block context overlap intools/batch_glb.pyif merged alongside #1750), plustests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Red/green:
pytest tests/test_batch_glb.pyfails on main (2 failed, 17 passed, 12 subtests passed) and passes on head 2689c7f5ba09 merged with main (17 passed, 14 subtests passed).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)