[Bf-blender-cvs] [b9ebb9014f8] filebrowser_redesign: Fix directory-browse button shown next to file browser directory path
Julian Eisel
noreply at git.blender.org
Mon Jul 22 19:36:56 CEST 2019
Commit: b9ebb9014f807bb29aad22f499631a14001e9d87
Author: Julian Eisel
Date: Sat Jul 20 19:46:56 2019 +0200
Branches: filebrowser_redesign
https://developer.blender.org/rBb9ebb9014f807bb29aad22f499631a14001e9d87
Fix directory-browse button shown next to file browser directory path
Its purpose was to open a file browser to select a path, which doesn't
make any sense for this button.
===================================================================
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 6dc0cf045cd..0e13d8267aa 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -5276,7 +5276,10 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Title", "Title for the file browser");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
+ /* Use BYTESTRING rather than DIRPATH as subtype so UI code doesn't add OT_directory_browse
+ * button when displaying this prop in the file browser (it would just open a file browser). That
+ * should be the only effective difference between the two. */
+ prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_BYTESTRING);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_FILE_PARAMS, NULL);
More information about the Bf-blender-cvs
mailing list