()
| 397 | # --------------------------------------------------------------------------- |
| 398 | |
| 399 | def main(): |
| 400 | global CAM_POS_BLOOM, CAM_YAW, CAM_PITCH, CAM_FOVY_DEG |
| 401 | global SUN_DIR_BLOOM, SUN_COLOR, SUN_STRENGTH |
| 402 | global FILL_DIR_BLOOM, FILL_COLOR, FILL_STRENGTH |
| 403 | global ENV_INTENSITY, SCENE_GLTF, OUTDOOR_HDR, NEEDS_DDS_SANITIZE |
| 404 | |
| 405 | scene, out_path, samples, device, view = parse_args() |
| 406 | s = SCENES[scene] |
| 407 | CAM_POS_BLOOM = s["cam_pos_bloom"] |
| 408 | CAM_YAW = s["cam_yaw"] |
| 409 | CAM_PITCH = s["cam_pitch"] |
| 410 | CAM_FOVY_DEG = s["cam_fovy_deg"] |
| 411 | SUN_DIR_BLOOM = s["sun_dir_bloom"] |
| 412 | SUN_COLOR = s["sun_color"] |
| 413 | SUN_STRENGTH = s["sun_strength"] |
| 414 | FILL_DIR_BLOOM = s["fill_dir_bloom"] |
| 415 | FILL_COLOR = s["fill_color"] |
| 416 | FILL_STRENGTH = s["fill_strength"] |
| 417 | ENV_INTENSITY = s["env_intensity"] |
| 418 | SCENE_GLTF = s["gltf"] |
| 419 | OUTDOOR_HDR = s["hdr"] |
| 420 | NEEDS_DDS_SANITIZE = s["needs_dds_sanitize"] |
| 421 | |
| 422 | print(f"[cycles_reference] scene={scene} out={out_path} samples={samples} device={device} view={view}") |
| 423 | |
| 424 | clear_scene() |
| 425 | import_scene_gltf() |
| 426 | setup_world_hdr() |
| 427 | setup_camera() |
| 428 | add_sun("Sun_Key", SUN_DIR_BLOOM, SUN_COLOR, SUN_STRENGTH) |
| 429 | add_sun("Sun_Fill", FILL_DIR_BLOOM, FILL_COLOR, FILL_STRENGTH) |
| 430 | setup_render(out_path, samples, device, view, |
| 431 | exposure_ev=s.get("exposure_ev", 0.0)) |
| 432 | |
| 433 | print("[cycles_reference] rendering…") |
| 434 | bpy.ops.render.render(write_still=True) |
| 435 | print(f"[cycles_reference] wrote {out_path}") |
| 436 | |
| 437 | |
| 438 | if __name__ == "__main__": |
no test coverage detected