chore: snapshot workflow migration progress
This commit is contained in:
@@ -29,6 +29,10 @@ import json
|
||||
import math
|
||||
from mathutils import Vector, Matrix
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from _blender_template_inputs import apply_template_inputs
|
||||
|
||||
# ── Colour palette (matches turntable_render.py / blender_render.py) ─────────
|
||||
PALETTE_HEX = [
|
||||
"#4C9BE8", "#E85B4C", "#4CBE72", "#E8A84C", "#A04CE8",
|
||||
@@ -476,6 +480,14 @@ def main():
|
||||
_idx = argv.index("--material-override")
|
||||
_material_override = argv[_idx + 1] if _idx + 1 < len(argv) else None
|
||||
|
||||
template_inputs = {}
|
||||
if "--template-inputs" in argv:
|
||||
_idx = argv.index("--template-inputs")
|
||||
try:
|
||||
template_inputs = json.loads(argv[_idx + 1]) if _idx + 1 < len(argv) else {}
|
||||
except Exception:
|
||||
template_inputs = {}
|
||||
|
||||
# Cinematic always uses camera orbit (camera moves, model stays)
|
||||
camera_orbit = True
|
||||
|
||||
@@ -535,6 +547,8 @@ def main():
|
||||
print("[cinematic_render] no template -- using factory settings (Mode A)")
|
||||
if material_library_path:
|
||||
print(f"[cinematic_render] material_library={material_library_path}, material_map keys={list(material_map.keys())}")
|
||||
if template_inputs:
|
||||
print(f"[cinematic_render] template_inputs={template_inputs}")
|
||||
|
||||
# ── SCENE SETUP ──────────────────────────────────────────────────────────
|
||||
_usd_mat_lookup: dict = {}
|
||||
@@ -543,6 +557,7 @@ def main():
|
||||
# ── MODE B: Template-based render ────────────────────────────────────
|
||||
print(f"[cinematic_render] Opening template: {template_path}")
|
||||
bpy.ops.wm.open_mainfile(filepath=template_path)
|
||||
apply_template_inputs(template_inputs)
|
||||
|
||||
target_col = _ensure_collection(target_collection)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user