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/makesrna/intern/rna_rna.c | |
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/makesrna/intern/rna_rna.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 57f75fe892c..8d5e82cbfa8 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -160,6 +160,7 @@ const EnumPropertyItem rna_enum_property_flag_items[] = { 0, "Update on every keystroke in textedit 'mode'", ""}, + {PROP_PATH_OUTPUT, "OUTPUT_PATH", 0, "Output Path", ""}, {0, NULL, 0, NULL, NULL}, }; @@ -729,6 +730,12 @@ static bool rna_Property_is_library_editable_flag_get(PointerRNA *ptr) return (prop->flag & PROP_LIB_EXCEPTION) != 0; } +static bool rna_Property_is_path_output_flag_get(PointerRNA *ptr) +{ + PropertyRNA *prop = (PropertyRNA *)ptr->data; + return (prop->flag & PROP_PATH_OUTPUT) != 0; +} + static int rna_Property_tags_get(PointerRNA *ptr) { return RNA_property_tags(ptr->data); @@ -3023,6 +3030,12 @@ static void rna_def_property(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Library Editable", "Property is editable from linked instances (changes not saved)"); + prop = RNA_def_property(srna, "is_path_output", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_boolean_funcs(prop, "rna_Property_is_path_output_flag_get", NULL); + RNA_def_property_ui_text( + prop, "Path Output", "Property is a filename, filepath or directory output"); + prop = RNA_def_property(srna, "tags", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, dummy_prop_tags); |