From 370f935f6555d28891cb4762ba9bd30ac5c90bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 29 Jul 2022 11:03:14 +0200 Subject: [PATCH] Simple-blender-render job: use absolute path for `render_output_path` Blender cannot be told to only allow absolute path for an RNA property (of type `string`, subtype `dir_path`), so as a workaround the final `render_output_path` is now using `bpy.path.abspath()` to make the path absolute. This has as advantage that the render output path can be defined by artists as a blendfile-relative path, and that it'll be resolved when submitting the blend file. --- internal/manager/job_compilers/scripts/simple_blender_render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/manager/job_compilers/scripts/simple_blender_render.js b/internal/manager/job_compilers/scripts/simple_blender_render.js index 1cab047c..42aa3418 100644 --- a/internal/manager/job_compilers/scripts/simple_blender_render.js +++ b/internal/manager/job_compilers/scripts/simple_blender_render.js @@ -15,7 +15,7 @@ const JOB_TYPE = { { key: "add_path_components", type: "int32", required: true, default: 0, propargs: {min: 0, max: 32}, visible: "submission", description: "Number of path components of the current blend file to use in the render output path"}, { key: "render_output_path", type: "string", subtype: "file_path", editable: false, - eval: "str(Path(settings.render_output_root) / last_n_dir_parts(settings.add_path_components) / jobname / '{timestamp}' / '######')", + eval: "str(Path(bpy.path.abspath(settings.render_output_root), last_n_dir_parts(settings.add_path_components), jobname, '{timestamp}', '######'))", description: "Final file path of where render output will be saved"}, // Automatically evaluated settings: