fix: cinematic render is_cinematic detection and usd_path str/Path handling
Three bugs causing all cinematic renders to silently fall through to the turntable path and then immediately crash: 1. is_cinematic read from filtered invocation-override dict — 'cinematic' key is not in the allowed override key list for turntable_video, so it gets stripped. Fixed: read directly from output_type.render_settings. 2. render_turntable_to_file and render_cinematic_to_file both call usd_path.exists() but receive a str from the caller. Added the same isinstance str→Path conversion that render_still_to_file already had. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -953,7 +953,7 @@ def build_order_line_render_invocation(
|
|||||||
output_filename=output_filename,
|
output_filename=output_filename,
|
||||||
output_path=str(output_dir / output_filename),
|
output_path=str(output_dir / output_filename),
|
||||||
is_animation=bool(output_type and output_type.is_animation),
|
is_animation=bool(output_type and output_type.is_animation),
|
||||||
is_cinematic=bool(output_type and render_settings.get("cinematic")),
|
is_cinematic=bool(output_type and output_type.render_settings and output_type.render_settings.get("cinematic")),
|
||||||
width=width,
|
width=width,
|
||||||
height=height,
|
height=height,
|
||||||
engine=str(engine) if engine not in (None, "") else None,
|
engine=str(engine) if engine not in (None, "") else None,
|
||||||
|
|||||||
@@ -566,6 +566,9 @@ def render_turntable_to_file(
|
|||||||
|
|
||||||
t0 = time.monotonic()
|
t0 = time.monotonic()
|
||||||
|
|
||||||
|
if isinstance(usd_path, str) and usd_path.strip():
|
||||||
|
usd_path = Path(usd_path)
|
||||||
|
|
||||||
# 1. GLB conversion (OCC) — skipped when usd_path is provided
|
# 1. GLB conversion (OCC) — skipped when usd_path is provided
|
||||||
use_usd = bool(usd_path and usd_path.exists())
|
use_usd = bool(usd_path and usd_path.exists())
|
||||||
|
|
||||||
@@ -804,6 +807,9 @@ def render_cinematic_to_file(
|
|||||||
|
|
||||||
t0 = time.monotonic()
|
t0 = time.monotonic()
|
||||||
|
|
||||||
|
if isinstance(usd_path, str) and usd_path.strip():
|
||||||
|
usd_path = Path(usd_path)
|
||||||
|
|
||||||
# 1. GLB conversion (OCC) — skipped when usd_path is provided
|
# 1. GLB conversion (OCC) — skipped when usd_path is provided
|
||||||
use_usd = bool(usd_path and usd_path.exists())
|
use_usd = bool(usd_path and usd_path.exists())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user