[Bf-blender-cvs] [aef6b5d10c0] soc-2020-outliner: Outliner: Draw collection icon as colored

Nathan Craddock noreply at git.blender.org
Tue Aug 4 00:26:31 CEST 2020


Commit: aef6b5d10c0506f157a60e8aed9ea22b29dc6592
Author: Nathan Craddock
Date:   Thu Jul 30 13:11:42 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rBaef6b5d10c0506f157a60e8aed9ea22b29dc6592

Outliner: Draw collection icon as colored

There were too many issues filling behind the collection icon, such as
the active box that draws was conflicting. This is safer to color just
the icon. We do need a different icon though.

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

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

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

diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 6b68f1c3a4b..d2a10732af6 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -2773,13 +2773,9 @@ static void tselem_draw_icon(uiBlock *block,
     return;
   }
 
-#if 0
   if (outliner_is_collection_tree_element(te)) {
     Collection *collection = outliner_collection_from_tree_element(te);
 
-    /* Reduce alpha to match icon buttons */
-    alpha *= 0.8f;
-
     /* placement of icons, copied from interface_widgets.c */
     float aspect = (0.8f * UI_UNIT_Y) / ICON_DEFAULT_HEIGHT;
     x += 2.0f * aspect;
@@ -2801,9 +2797,6 @@ static void tselem_draw_icon(uiBlock *block,
   }
   /* Icon is covered by restrict buttons */
   else if (!is_clickable || x >= xmax) {
-#endif /* if 0 */
-
-  if (!is_clickable || x >= xmax) {
     /* Reduce alpha to match icon buttons */
     alpha *= 0.8f;
 
@@ -3219,7 +3212,7 @@ static void outliner_draw_tree_element(bContext *C,
       te->flag |= TE_ACTIVE; /* For lookup in display hierarchies. */
     }
 
-#if 1
+#if 0
     /* Collection colors. */
     if (outliner_is_collection_tree_element(te)) {
       Collection *collection = outliner_collection_from_tree_element(te);



More information about the Bf-blender-cvs mailing list