diff options
author | Dalai Felinto <dalai@blender.org> | 2022-09-21 11:57:36 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2022-09-21 12:06:44 +0300 |
commit | 78bfaf1a4fe1a71408e4dab7268b1af1ed1b88f4 (patch) | |
tree | 69253d495df47dc5baaa1dff0289da23cb04dd24 /source/blender/editors | |
parent | 15593299f3d9164fe1c2ca91d317206a2b64ad6e (diff) |
File Browser: Manual auto-increase name support for output filepaths
This functionality was present until Blender 2.80. Basically it adds back the
"+" and "-" buttons in the file browser when it stores an output filepath.
This is useful for someone rendering multiple versions of an animation (or a
composition) to compare.
At the moment this is used for the render output, and the File Output node in
the compositor.
Differential Revision: https://developer.blender.org/D15968
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 10fb008049d..a9ce9a3d723 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -337,6 +337,12 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) RNA_string_set(op->ptr, path_prop, str); MEM_freeN(str); + PropertyRNA *prop_check_existing = RNA_struct_find_property(op->ptr, "check_existing"); + if (!RNA_property_is_set(op->ptr, prop_check_existing)) { + const bool is_output_path = (RNA_property_flag(prop) & PROP_PATH_OUTPUT) != 0; + RNA_property_boolean_set(op->ptr, prop_check_existing, is_output_path); + } + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; |