fix: material override pipeline — pass --material-override CLI arg to Blender scripts
The initial implementation only overrode the material_map dict in the task, but the Blender USD primvar path bypassed it. Now: - Added --material-override named CLI arg parsed in _blender_args.py - Both Mode A (factory) and Mode B (template) in _blender_scene_setup.py override usd_material_lookup and material_map when set - Passed through full chain: task → step_processor → render_blender → CLI → Blender - Tested: 175-part bearing rendered with single Steel-Bare material (1/1 materials) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -893,6 +893,7 @@ def render_to_file(
|
||||
tessellation_engine: str | None = None,
|
||||
focal_length_mm: float | None = None,
|
||||
sensor_width_mm: float | None = None,
|
||||
material_override: str | None = None,
|
||||
) -> tuple[bool, dict]:
|
||||
"""Render a STEP file to a specific output path using current system settings.
|
||||
|
||||
@@ -1031,6 +1032,7 @@ def render_to_file(
|
||||
tessellation_engine=tessellation_engine or settings["tessellation_engine"],
|
||||
focal_length_mm=focal_length_mm,
|
||||
sensor_width_mm=sensor_width_mm,
|
||||
material_override=material_override,
|
||||
)
|
||||
rendered_png = tmp_png if tmp_png.exists() else None
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user