Commit Graph

9 Commits

Author SHA1 Message Date
2feedae696 Merge pull request #3852 from bbareth
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:55 -05:00
4799d88d75 Reject invalid batch_glb CLI limits before conversion 2026-11-22 23:04:19 +01:00
6030a08930 Merge pull request #3337 from bobcatchris 2026-11-22 17:01:30 -05:00
c31de8d599 batch_glb: the texture cache is exclusive, an empty PNG is a failure, one drop line per texture
Review corrections (kacper-serewis, #3337):

- The (bytes, reason) cache is a TextureCache with its own lock: the pool
  runs one model per thread, so two workers reaching the same broken DDS
  both entered the decoder and the once-per-batch guarantee only held for
  sequential primitives. The new two-model test releases a Barrier of 2
  when a second thread gets in, so it fails on the unlocked shape.
- An empty PNG read returned (b'', ''): falsy, so not embedded, and with
  no reason, so not reported either. It is now 'the PNG file is empty'
  (and the same guard for a DDS decode that produced nothing).
- Two primitives of one model referencing the same broken DDS produced two
  identical dropped lines and counted twice; dropped is deduplicated per
  model by texture path.
2026-11-22 14:38:27 -06:00
d728b80c3e Merge pull request #3146 from airp1ane 2026-11-22 15:15:09 -05:00
d876da115a batch_glb: name dropped textures and failed models instead of passing silently
_load_png_bytes swallowed every DDS decode error and returned None, so a
model was written without its texture yet counted in converted N/N with
exit 0, while a PNG that could not be read failed the whole model; a failed
decode was not cached either, so every primitive retried it. batch_convert
also discarded convert_single's error string, counting a failed model
without naming it or saying why.

_load_png_bytes now returns (bytes, reason) and both the PNG read and the
DDS decode take the same path: the texture is left out of that model,
listed per model with its reason, counted in the summary (cached, so a
broken DDS is decoded once) and the exit code stays 1 only when a model
failed -- the fssm_unpack tolerance, made visible. main prints one line
per failed model and per unembedded texture.
2026-11-22 14:09:27 -06:00
23d231b8c6 batch_glb: report directory setup errors cleanly 2026-11-22 14:30:51 -05:00
adc064770a fix(assets): keep unnamed GLB material textures separate
A dotted OBJ filename and a named material can select different PNGs even when the clean filename stem matches the material name. Keeping the original empty key prevents either texture from replacing the other.
2026-11-22 19:20:11 +01:00
5394b8d548 tools: add multi-threaded batch glb converter with texture linking and bcpack inspector 2026-11-22 19:03:31 +03:00