[Bf-blender-cvs] [8ca698427fd] master: Fix T80880: Outliner colored hierarchy lines on objects
Nathan Craddock
noreply at git.blender.org
Sat Sep 19 03:33:30 CEST 2020
Commit: 8ca698427fdcbabc60ca22bdfeb91e1e0ce1f5d0
Author: Nathan Craddock
Date: Fri Sep 18 18:21:57 2020 -0600
Branches: master
https://developer.blender.org/rB8ca698427fdcbabc60ca22bdfeb91e1e0ce1f5d0
Fix T80880: Outliner colored hierarchy lines on objects
Expanded objects with children immediately after a colored collection
would have the color applied to their hierarchy lines as well. The fix
is to reset the collection color to `COLLECTION_COLOR_NONE` for each
open subtree.
===================================================================
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 fb6d3a74e76..ff84c3c9d88 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -3360,7 +3360,6 @@ static void outliner_draw_hierarchy_lines_recursive(uint pos,
{
bTheme *btheme = UI_GetTheme();
int y = *starty;
- short color_tag = COLLECTION_COLOR_NONE;
/* Small vertical padding */
const short line_padding = UI_UNIT_Y / 4.0f;
@@ -3371,8 +3370,9 @@ static void outliner_draw_hierarchy_lines_recursive(uint pos,
TreeStoreElem *tselem = TREESTORE(te);
draw_hierarchy_line = false;
*starty -= UI_UNIT_Y;
+ short color_tag = COLLECTION_COLOR_NONE;
- /* Only draw hierarchy lines for open collections. */
+ /* Only draw hierarchy lines for expanded collections and objects with children. */
if (TSELEM_OPEN(tselem, space_outliner) && !BLI_listbase_is_empty(&te->subtree)) {
if (tselem->type == TSE_LAYER_COLLECTION) {
draw_hierarchy_line = true;
More information about the Bf-blender-cvs
mailing list