fix(USD): correct coordinate transform (Z-up stage) and store canonical_material in DB

- export_step_to_usd.py: change stage from Y-up to Z-up, keep (X,-Z,Y)
  transform — matches GLB orientation exactly (verified: bounding box match)
- export_glb.py: include canonical_material in resolved_material_assignments
  DB field (was being dropped during manifest parsing)
- import_usd.py: use pxr customData read (not string primvars — Blender
  ignores those, confirmed by testing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 23:17:45 +01:00
parent cc3071297b
commit b72d8498b9
2 changed files with 10 additions and 3 deletions
@@ -768,7 +768,11 @@ def generate_usd_master_task(self, cad_file_id: str) -> dict:
if manifest_parts:
try:
resolved = {
p["part_key"]: {"source_name": p["source_name"], "prim_path": p["prim_path"]}
p["part_key"]: {
"source_name": p["source_name"],
"prim_path": p["prim_path"],
"canonical_material": p.get("canonical_material"),
}
for p in manifest_parts
}
eng3 = _ce(sync_url)