Adds 8 scripts to tooling/ for the Sprint 28 character asset pipeline: - blender_segment_body.py: segments a FullBody GLTF into 18 body-part GLBs using BMesh vertex-weight selection + 1-ring boundary expansion - blender_process_bodies.py: batch driver for all 11 body types (6 direct + 5 auto-scaled forks: thin, heavy, child) - blender_process_heads.py: processes 4 OnlyHead .blend files into GLBs + 1024x1024 solid-white mask PNGs (D-159, D-160) - blender_process_hair.py: converts 20 GLTF hairstyle/eyebrow exports to accessory GLBs + mask PNGs, creates bald.glb placeholder - blender_inspect_body.py: diagnostic — lists mesh objects + vertex counts - blender_inspect_vgroups.py: diagnostic — lists vertex groups on skinned mesh - glb_strip_utility_nodes.py: post-process GLBs to strip utility nodes (Icosphere, WGT-*, DEF-*, ORG-* meshes) from the GLTF scene graph - check_icosphere.py: diagnostic — reads GLB JSON chunk to verify node list All Blender scripts require flatpak Blender via tooling/blender wrapper. Scripts must live in project directories (flatpak sandbox blocks /tmp/). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
658 B
Python
20 lines
658 B
Python
"""
|
|
blender_inspect_body.py
|
|
Usage: tooling/blender --background --python tooling/blender_inspect_body.py -- <input.gltf>
|
|
|
|
Lists all mesh objects in a FullBody GLTF: names, vertex counts, vertex group counts.
|
|
"""
|
|
import sys
|
|
import bpy
|
|
|
|
argv = sys.argv
|
|
args = argv[argv.index("--") + 1:]
|
|
bpy.ops.wm.read_factory_settings(use_empty=True)
|
|
bpy.ops.import_scene.gltf(filepath=args[0])
|
|
print("Scene objects:")
|
|
for obj in sorted(bpy.context.scene.objects, key=lambda o: o.name):
|
|
if obj.type == 'MESH':
|
|
print(f" MESH: {obj.name!r} verts={len(obj.data.vertices)} vgroups={len(obj.vertex_groups)}")
|
|
else:
|
|
print(f" {obj.type}: {obj.name!r}")
|