Files
settled-reach/tooling/check_icosphere.py
T
jpmschweitzerandClaude Opus 4.6 a60493c2f7 chore(assets): add Blender headless pipeline scripts for character assets
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>
2026-03-22 15:07:55 +01:00

19 lines
828 B
Python

"""List all objects in a Quaternius .blend file."""
import sys, bpy
argv = sys.argv
args = argv[argv.index("--") + 1:]
bpy.ops.wm.open_mainfile(filepath=args[0])
print("\nAll scene objects:")
for o in sorted(bpy.context.scene.objects, key=lambda x: x.name):
parent_info = f" (parent: {o.parent.name}" + (f", bone: {o.parent_bone}" if o.parent_bone else "") + ")" if o.parent else ""
verts = f", {len(o.data.vertices)} verts" if o.type == 'MESH' else ""
loc = tuple(round(v, 3) for v in o.matrix_world.translation)
print(f" {o.name:30s} type={o.type:10s} loc={loc}{verts}{parent_info}")
arm = next((o for o in bpy.context.scene.objects if o.type == 'ARMATURE'), None)
if arm:
head_bone = arm.data.bones.get('Head')
if head_bone:
print(f"\nHead bone top: z={round(head_bone.tail_local[2], 4)}")