[Bf-blender-cvs] [12bd445aab8] soc-2020-outliner: Collections: Use filled collection icon in menus

Nathan Craddock noreply at git.blender.org
Sat Aug 15 00:46:38 CEST 2020


Commit: 12bd445aab87523ba1caf0480eff1dd1050001af
Author: Nathan Craddock
Date:   Fri Aug 14 16:32:11 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB12bd445aab87523ba1caf0480eff1dd1050001af

Collections: Use filled collection icon in menus

After using colored icons in menus, use normal icon for non-tagged
collections for consistency.

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

M	source/blender/editors/interface/interface_icons.c

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

diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 63c62c02065..04117b2d6e0 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -2354,11 +2354,14 @@ int UI_idcode_icon_get(const int idcode)
 
 int UI_collection_color_icon_get(const Collection *collection)
 {
-  int icon = ICON_NONE;
+  int icon = ICON_OUTLINER_COLLECTION;
 
   if (collection->color != COLLECTION_COLOR_NONE) {
     icon = ICON_COLLECTION_COLOR_01 + (collection->color - 1);
   }
+  else if (ID_IS_LINKED(&collection->id)) {
+    icon = ICON_LINKED;
+  }
 
   return icon;
 }



More information about the Bf-blender-cvs mailing list