Files
settled-reach/tooling/test_quaternius_raw.py
jpmschweitzerandClaude Opus 4.6 2300d9659d fix(tooling): remove unused imports flagged by ruff
Drop unused hashlib, math, and os imports from assign-astro-ids,
generate-star-map, and test_quaternius_raw to pass ruff clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 09:40:02 +02:00

42 lines
1.6 KiB
Python

"""Load original Quaternius body + hair as-is and export a combined GLB for visual inspection."""
import sys
import bpy
if __name__ == "__main__":
argv = sys.argv
if "--" not in argv:
print("Usage: blender --background --python test_quaternius_raw.py -- <output.glb>")
sys.exit(1)
output = argv[argv.index("--") + 1]
bpy.ops.wm.read_factory_settings(use_empty=True)
# Load the Superhero Female body (original, unmodified)
body_path = "/var/mnt/data/projects/settled-reach/main/docs/assets/downloads/Universal Base Characters[Source]/Base Characters/Exports/Godot - UE/Superhero_Female_FullBody.gltf"
bpy.ops.import_scene.gltf(filepath=body_path)
print("=== After body import ===")
for obj in bpy.context.scene.objects:
print(f" {obj.name} type={obj.type}")
# Load bob hair (Rigged to Head Bone, Female)
hair_path = "/var/mnt/data/projects/settled-reach/main/docs/assets/downloads/Universal Base Characters[Source]/Hairstyles/Rigged to Head Bone/glTF (Godot -Unreal)/Female/Hair_Bob.gltf"
bpy.ops.import_scene.gltf(filepath=hair_path)
print("=== After hair import ===")
for obj in bpy.context.scene.objects:
print(f" {obj.name} type={obj.type} parent={obj.parent.name if obj.parent else 'None'}")
# Export everything as one GLB
bpy.ops.object.select_all(action='SELECT')
bpy.ops.export_scene.gltf(
filepath=output,
use_selection=True,
export_format='GLB',
export_animations=False,
export_yup=True,
export_skins=True,
export_materials='EXPORT',
)
print(f"Exported: {output}")