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:
authorDalai Felinto <dalai@blender.org>2022-09-21 11:57:36 +0300
committerDalai Felinto <dalai@blender.org>2022-09-21 12:06:44 +0300
commit78bfaf1a4fe1a71408e4dab7268b1af1ed1b88f4 (patch)
tree69253d495df47dc5baaa1dff0289da23cb04dd24 /source/blender/windowmanager
parent15593299f3d9164fe1c2ca91d317206a2b64ad6e (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/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index 71c948dfbb9..bd3322a8023 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -120,16 +120,14 @@ void WM_operator_properties_filesel(wmOperatorType *ot,
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
- if (action == FILE_SAVE) {
- /* NOTE: this is only used to check if we should highlight the filename area red when the
- * filepath is an existing file. */
- prop = RNA_def_boolean(ot->srna,
- "check_existing",
- true,
- "Check Existing",
- "Check and warn on overwriting existing files");
- RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
- }
+ /* NOTE: this is only used to check if we should highlight the filename area red when the
+ * filepath is an existing file. */
+ prop = RNA_def_boolean(ot->srna,
+ "check_existing",
+ action == FILE_SAVE,
+ "Check Existing",
+ "Check and warn on overwriting existing files");
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
prop = RNA_def_boolean(
ot->srna, "filter_blender", (filter & FILE_TYPE_BLENDER) != 0, "Filter .blend files", "");