[PR #1751] batch_glb: try a same-stem DDS when the preferred PNG cannot be read #1764

Open
opened 2026-11-26 21:18:52 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1751
Author: @kirigayakazima
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/batch-glb-dds-sibling-fallback


📝 Commits (1)

  • a0957dc batch_glb: try a same-stem DDS when the preferred PNG cannot be read

📊 Changes

2 files changed (+41 additions, -22 deletions)

View changed files

📝 tests/test_batch_glb.py (+22 -0)
📝 tools/batch_glb.py (+19 -22)

📄 Description

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.py passed all 17 tests on this branch (Windows, Python 3.14.7).
  • git diff --check and the repository game-data scan of all changed paths passed.
  • The five independent changes were also merged locally. Both affected test files passed together (50 tests) and the three character-model consumer suites passed (28 tests). The shared base at bcaa13da passed 6,287 semantic tests across 488 files.

GPUs tested: N/A (CPU-only asset tooling).
AI-assisted: Yes.

Checklist

  • Based on current upstream main.
  • One topic.
  • Only synthetic test fixtures. No game data, keys or decryption.
  • Translator contract table: N/A.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1751 **Author:** [@kirigayakazima](https://github.com/kirigayakazima) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/batch-glb-dds-sibling-fallback` --- ### 📝 Commits (1) - [`a0957dc`](https://github.com/ubiquitarianism/leonida/commit/a0957dcd899e54ba7b4ab239b097516ecd60f95a) batch_glb: try a same-stem DDS when the preferred PNG cannot be read ### 📊 Changes **2 files changed** (+41 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_batch_glb.py` (+22 -0) 📝 `tools/batch_glb.py` (+19 -22) </details> ### 📄 Description Claimed in the coordination issue as: [BATCH-GLB-DDS-SIBLING-FALLBACK](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160621714) ### 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.py` passed all 17 tests on this branch (Windows, Python 3.14.7). - `git diff --check` and the repository game-data scan of all changed paths passed. - The five independent changes were also merged locally. Both affected test files passed together (50 tests) and the three character-model consumer suites passed (28 tests). The shared base at `bcaa13da` passed 6,287 semantic tests across 488 files. GPUs tested: N/A (CPU-only asset tooling). AI-assisted: Yes. ### Checklist - [x] Based on current upstream main. - [x] One topic. - [x] Only synthetic test fixtures. No game data, keys or decryption. - Translator contract table: N/A. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1764
No description provided.