backup befor new branch to test Blockbenh instead of regex renderer

This commit is contained in:
2026-08-04 16:04:30 -05:00
parent f59e9a165c
commit 8c17c273fe
11 changed files with 376 additions and 19 deletions
+19
View File
@@ -275,10 +275,29 @@ def read_models_manifest(path):
for bone in geom.get('bones') or []:
bone_count += 1
cube_count += len(bone.get('cubes') or [])
entity = name.rsplit('/', 1)[-1]
if entity.endswith('.geo.json'):
entity = entity[:-len('.geo.json')]
for suffix in ('.mf', '.fm', '.m', '.f', '.g'):
if entity.endswith(suffix):
entity = entity[:-len(suffix)]
break
# A pack-provided full skin is the model's default texture when the
# model has no per-bone textures of its own.
default_texture = ''
if not bone_textures and entity:
for n in names:
if n.endswith(f'/textures/entity/{entity}/{entity}.png') or n.endswith(f'/textures/entity/{entity}.png'):
default_texture = n
break
models.append({
'name': name.rsplit('/', 1)[-1],
'member': name,
'identifier': identifier,
'entity': entity,
'default_texture': default_texture,
'bones': bone_count,
'cubes': cube_count,
'bone_textures': bone_textures,