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:
authorHarley Acheson <harley.acheson@gmail.com>2019-12-07 00:10:30 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-12-07 00:10:30 +0300
commit7c2217cd126a97df9b1c305f79a605f25c06a229 (patch)
tree4033f2c2e3ecc35bd82c610e408762dac722afe0 /source/blender/makesrna/intern/rna_space.c
parenta05b79e96d79757d5ad3fca95a766f4134b9368e (diff)
UI: File Browser Volumes and System Lists Icons
Allows each File Browser list item in Volumes and System to use individual icons. Differential Revision: https://developer.blender.org/D5802 Reviewed by Julian Eisel
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 7b0f3bf708c..c26ba5b022d 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2312,6 +2312,18 @@ static int rna_FileBrowser_FSMenuEntry_name_get_editable(PointerRNA *ptr,
return fsm->save ? PROP_EDITABLE : 0;
}
+static int rna_FileBrowser_FSMenuEntry_icon_get(PointerRNA *ptr)
+{
+ FSMenuEntry *fsm = ptr->data;
+ return ED_fsmenu_entry_get_icon(fsm);
+}
+
+static void rna_FileBrowser_FSMenuEntry_icon_set(PointerRNA *ptr, int value)
+{
+ FSMenuEntry *fsm = ptr->data;
+ ED_fsmenu_entry_set_icon(fsm, value);
+}
+
static bool rna_FileBrowser_FSMenuEntry_use_save_get(PointerRNA *ptr)
{
FSMenuEntry *fsm = ptr->data;
@@ -5573,6 +5585,11 @@ static void rna_def_filemenu_entry(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
+ prop = RNA_def_property(srna, "icon", PROP_INT, PROP_NONE);
+ RNA_def_property_int_funcs(
+ prop, "rna_FileBrowser_FSMenuEntry_icon_get", "rna_FileBrowser_FSMenuEntry_icon_set", NULL);
+ RNA_def_property_ui_text(prop, "Icon", "");
+
prop = RNA_def_property(srna, "use_save", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_use_save_get", NULL);
RNA_def_property_ui_text(