chore: snapshot workflow migration progress
This commit is contained in:
@@ -47,6 +47,13 @@ def parse_args() -> SimpleNamespace:
|
||||
denoising_quality = _arg(23, "")
|
||||
denoising_use_gpu = _arg(24, "")
|
||||
|
||||
if samples is None:
|
||||
default_samples = os.environ.get("BLENDER_DEFAULT_SAMPLES", "").strip()
|
||||
if default_samples:
|
||||
try:
|
||||
samples = int(default_samples)
|
||||
except ValueError:
|
||||
samples = None
|
||||
if samples is None:
|
||||
samples = 64 if engine == "eevee" else 256
|
||||
|
||||
@@ -78,6 +85,14 @@ def parse_args() -> SimpleNamespace:
|
||||
_mo_idx = sys.argv.index("--material-override")
|
||||
material_override = sys.argv[_mo_idx + 1] if _mo_idx + 1 < len(sys.argv) else None
|
||||
|
||||
template_inputs: dict = {}
|
||||
if "--template-inputs" in sys.argv:
|
||||
_ti_idx = sys.argv.index("--template-inputs")
|
||||
try:
|
||||
template_inputs = _json.loads(sys.argv[_ti_idx + 1]) if _ti_idx + 1 < len(sys.argv) else {}
|
||||
except Exception:
|
||||
template_inputs = {}
|
||||
|
||||
if template_path and not os.path.isfile(template_path):
|
||||
print(f"[blender_render] ERROR: template not found: {template_path}")
|
||||
sys.exit(1)
|
||||
@@ -114,4 +129,5 @@ def parse_args() -> SimpleNamespace:
|
||||
focal_length_mm=focal_length_mm,
|
||||
sensor_width_mm=sensor_width_mm_override,
|
||||
material_override=material_override,
|
||||
template_inputs=template_inputs,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user