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:
authorNathan Craddock <nzcraddock@gmail.com>2020-09-15 21:22:03 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-09-15 21:47:09 +0300
commit4c3813fb32567805ef6eac708e3602c2d367cc58 (patch)
tree2f828ef9050350bbc4fe8e6de87d38abc70c778e /source/blender/windowmanager
parent452a1c7b38383fd3f51532c429912677864e4a33 (diff)
UI: Show color tagged collection icons in menus
Draw color tagged collection icons in the link to collection, add collection instance, collection instance search, and remove collection menus. Manifest Task: https://developer.blender.org/T77777 Differential Revision: https://developer.blender.org/D8622
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index ffe2ffac3a2..0f3409af3d3 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3991,6 +3991,12 @@ static const EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C),
if (local == false || !ID_IS_LINKED(id)) {
item_tmp.identifier = item_tmp.name = id->name + 2;
item_tmp.value = i++;
+
+ /* Show collection color tag icons in menus. */
+ if (GS(id->name) == ID_GR) {
+ item_tmp.icon = UI_collection_color_icon_get((Collection *)id);
+ }
+
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}