[Bf-blender-cvs] [8184c39ca7a] soc-2019-outliner: Outliner: Draw icons in merged icon select menu

Nathan Craddock noreply at git.blender.org
Fri Jul 19 21:57:03 CEST 2019


Commit: 8184c39ca7afcae330deb0b7624d75e68ef18c61
Author: Nathan Craddock
Date:   Fri Jul 19 10:40:59 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB8184c39ca7afcae330deb0b7624d75e68ef18c61

Outliner: Draw icons in merged icon select menu

Get icon for each tree element when listing the menu

===================================================================

M	source/blender/editors/space_outliner/outliner_select.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 53a926dd6e4..748fae63ba4 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1381,13 +1381,16 @@ static void merged_element_search_cb_recursive(const ListBase *tree,
                                                uiSearchItems *items)
 {
   char name[64];
+  int iconid;
 
   for (TreeElement *te = tree->first; te; te = te->next) {
     if (tree_element_id_type_to_index(te) == type) {
       if (BLI_strcasestr(te->name, str)) {
         BLI_strncpy(name, te->name, 64);
 
-        if (!UI_search_item_add(items, name, te, 0)) {
+        iconid = tree_element_get_icon(TREESTORE(te), te).icon;
+
+        if (!UI_search_item_add(items, name, te, iconid)) {
           break;
         }
       }



More information about the Bf-blender-cvs mailing list