feat(M5-M7): embed canonical material names in USD via customData + pxr direct read
- export_step_to_usd.py: accept --material_map CLI arg, write
schaeffler:canonicalMaterialName as customData on each Mesh prim,
fix geometry transform (strip shape Location before face exploration,
apply both face_loc and shape_loc sequentially)
- import_usd.py: after Blender USD import, use pxr to read customData
directly from the USD file — builds {part_key: material_name} lookup
(Blender ignores STRING primvars and customData, but pxr reads both)
- _blender_materials.py: add apply_material_library_direct() for exact
dict-based material assignment without name-matching heuristics
- _blender_scene_setup.py: prefer direct USD lookup, fall back to
name-matching for legacy USD files without material metadata
- export_glb.py (generate_usd_master_task): resolve material_map via
material_service.resolve_material_map() and pass to subprocess;
include material hash in cache key for invalidation
- ROADMAP.md: update P5 status, add M5-M7 milestones
Tested: 3/3 parts matched (ans_lfs120), 172/175 parts matched
(F-802007.TR4-D1-H122AG). Previous: 0/25 matched.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ process_step_file [queue: step_processing, worker container]
|
||||
→ parses STEP objects, stores parsed_objects
|
||||
→ queues render_step_thumbnail
|
||||
|
||||
render_step_thumbnail [queue: thumbnail_rendering, render-worker container]
|
||||
render_step_thumbnail [queue: asset_pipeline, render-worker container]
|
||||
→ backend/app/domains/pipeline/tasks/render_thumbnail.py
|
||||
→ subprocess: export_step_to_gltf.py (OCC/GMSH tessellation → geometry GLB)
|
||||
→ subprocess: export_gltf.py (Blender: materials, seams, sharp edges → production GLB)
|
||||
@@ -123,7 +123,7 @@ from app.tasks.celery_app import celery_app
|
||||
celery_app.send_task(
|
||||
'app.domains.pipeline.tasks.render_thumbnail.render_step_thumbnail',
|
||||
args=['[cad_file_id]'],
|
||||
queue='thumbnail_rendering'
|
||||
queue='asset_pipeline'
|
||||
)"
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user