Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c6
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;