File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -672,6 +672,9 @@ <h2>Source</h2>
672672 scene.view_settings.view_transform = < span class ="s "> "Filmic"</ span >
673673 scene.view_settings.look = < span class ="s "> "Medium High Contrast"</ span >
674674 scene.render.image_settings.file_format = < span class ="s "> "PNG"</ span >
675+ < span class ="c "> # Blender resolves a relative filepath against the blend-file directory, which</ span >
676+ < span class ="c "> # for a --background run with no .blend is the drive root, not the cwd.</ span >
677+ path = os.path.abspath(path)
675678 scene.render.filepath = path
676679 bpy.ops.render.render(write_still=< span class ="k "> True</ span > )
677680 < span class ="k "> return</ span > os.path.exists(path) < span class ="k "> and</ span > os.path.getsize(path) > < span class ="n "> 0</ span >
Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ <h2>Source</h2>
402402 < span class ="k "> try</ span > : sc.eevee.taa_render_samples = < span class ="n "> 64</ span >
403403 < span class ="k "> except</ span > Exception: < span class ="k "> pass</ span >
404404 sc.render.resolution_x = < span class ="n "> 1280</ span > ; sc.render.resolution_y = < span class ="n "> 720</ span >
405+ < span class ="c "> # Blender resolves a relative filepath against the blend-file directory, which</ span >
406+ < span class ="c "> # for a --background run with no .blend is the drive root, not the cwd.</ span >
407+ path = os.path.abspath(path)
405408 sc.render.image_settings.file_format = < span class ="s "> 'PNG'</ span > ; sc.render.filepath = path
406409 < span class ="c "> # AgX would wash the crimson toward brick (docs/VISUAL-STYLE.md)</ span >
407410 sc.view_settings.view_transform = < span class ="s "> 'Standard'</ span >
Original file line number Diff line number Diff line change @@ -421,6 +421,9 @@ <h2>Source</h2>
421421 < span class ="c "> # arbitrary turntable frame can land face-away and read as broken geometry.</ span >
422422 sc.frame_set(< span class ="n "> 4</ span > )
423423 sc.render.resolution_x = < span class ="n "> 1280</ span > ; sc.render.resolution_y = < span class ="n "> 720</ span >
424+ < span class ="c "> # Blender resolves a relative filepath against the blend-file directory, which</ span >
425+ < span class ="c "> # for a --background run with no .blend is the drive root, not the cwd.</ span >
426+ path = os.path.abspath(path)
424427 sc.render.image_settings.file_format = < span class ="s "> 'PNG'</ span > ; sc.render.filepath = path
425428 < span class ="c "> # AgX would wash the copper toward beige (docs/VISUAL-STYLE.md)</ span >
426429 sc.view_settings.view_transform = < span class ="s "> 'Standard'</ span >
You can’t perform that action at this time.
0 commit comments