Commit: 30801617a662b69c98f54fa856e8d231a9bcd166
Author: Nathan Craddock
Date:   Mon Aug 17 20:54:36 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB30801617a662b69c98f54fa856e8d231a9bcd166

Cleanup: Remove unused outliner code

Some functions that have been rewritten for GSoC 2020 can now be
removed.

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

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 5bc63e4648e..7128dee9aeb 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -3175,29 +3175,6 @@ static void outliner_draw_tree_element(bContext *C,
       te->flag |= TE_ACTIVE; /* For lookup in display hierarchies. */
     }
 
-#if 0
-    /* Collection colors. */
-    if (outliner_is_collection_tree_element(te)) {
-      Collection *collection = outliner_collection_from_tree_element(te);
-
-      if (collection->color != COLLECTION_COLOR_NONE) {
-        bTheme *btheme = UI_GetTheme();
-        float color[4];
-        rgba_uchar_to_float(color, btheme->collection_color[collection->color 
- 1].color);
-
-        UI_draw_roundbox_corner_set(UI_CNR_ALL);
-        UI_draw_roundbox_aa(true,
-                            (float)startx + offsx + UI_UNIT_X,
-                            (float)*starty + ufac,
-                            (float)startx + offsx + 2.0f * UI_UNIT_X,
-                            (float)*starty + UI_UNIT_Y - ufac,
-                            UI_UNIT_Y / 4.0f,
-                            color);
-        GPU_blend(true);
-      }
-    }
-#endif /* if 0 */
-
     if (tselem->type == TSE_VIEW_COLLECTION_BASE) {
       /* Scene collection in view layer can't expand/collapse. */
     }
@@ -3322,112 +3299,6 @@ static void outliner_draw_tree_element(bContext *C,
   }
 }
 
-#if 0
-
-    static void
-    outliner_draw_hierarchy_lines_recursive_old(uint pos,
-                                                SpaceOutliner *space_outliner,
-                                                ListBase *lb,
-                                                int startx,
-                                                const uchar col[4],
-                                                bool draw_grayed_out,
-                                                int *starty)
-{
-  TreeElement *te, *te_vertical_line_last = NULL, 
*te_vertical_line_last_dashed = NULL;
-  int y1, y2, y1_dashed, y2_dashed;
-
-  if (BLI_listbase_is_empty(lb)) {
-    return;
-  }
-
-  struct {
-    int steps_num;
-    int step_len;
-    int gap_len;
-  } dash = {
-      .steps_num = 4,
-  };
-
-  dash.step_len = UI_UNIT_X / dash.steps_num;
-  dash.gap_len = dash.step_len / 2;
-
-  const uchar grayed_alpha = col[3] / 2;
-
-  /* For vertical lines between objects. */
-  y1 = y2 = y1_dashed = y2_dashed = *starty;
-  for (te = lb->first; te; te = te->next) {
-    bool draw_children_grayed_out = draw_grayed_out || (te->flag & 
TE_DRAGGING);
-    TreeStoreElem *tselem = TREESTORE(te);
-
-    if (draw_children_grayed_out) {
-      immUniformColor3ubvAlpha(col, grayed_alpha);
-    }
-    else {
-      immUniformColor4ubv(col);
-    }
-
-    if ((te->flag & TE_CHILD_NOT_IN_COLLECTION) == 0) {
-      /* Horizontal Line? */
-      if (tselem->type == 0 && (te->idcode == ID_OB || te->idcode == ID_SCE)) {
-        immRecti(pos, startx, *starty, startx + UI_UNIT_X, *starty - 
U.pixelsize);
-
-        /* Vertical Line? */
-        if (te->idcode == ID_OB) {
-          te_vertical_line_last = te;
-          y2 = *starty;
-        }
-        y1_dashed = *starty - UI_UNIT_Y;
-      }
-    }
-    else {
-      BLI_assert(te->idcode == ID_OB);
-      /* Horizontal line - dashed. */
-      int start = startx;
-      for (int i = 0; i < dash.steps_num; i++) {
-        immRecti(pos, start, *starty, start + dash.step_len - dash.gap_len, 
*starty - U.pixelsize);
-        start += dash.step_len;
-      }
-
-      te_vertical_line_last_dashed = te;
-      y2_dashed = *starty;
-    }
-
-    *starty -= UI_UNIT_Y;
-
-    if (TSELEM_OPEN(tselem, space_outliner)) {
-      outliner_draw_hierarchy_lines_recursive_old(
-          pos, space_outliner, &te->subtree, startx + UI_UNIT_X, col, 
draw_children_grayed_out, starty);
-    }
-  }
-
-  if (draw_grayed_out) {
-    immUniformColor3ubvAlpha(col, grayed_alpha);
-  }
-  else {
-    immUniformColor4ubv(col);
-  }
-
-  /* Vertical line. */
-  te = te_vertical_line_last;
-  if ((te != NULL) && (te->parent || lb->first != lb->last)) {
-    immRecti(pos, startx, y1 + UI_UNIT_Y, startx + U.pixelsize, y2);
-  }
-
-  /* Children that are not in the collection are always in the end of the 
subtree.
-   * This way we can draw their own dashed vertical lines. */
-  te = te_vertical_line_last_dashed;
-  if ((te != NULL) && (te->parent || lb->first != lb->last)) {
-    const int steps_num = ((y1_dashed + UI_UNIT_Y) - y2_dashed) / 
dash.step_len;
-    int start = y1_dashed + UI_UNIT_Y;
-    for (int i = 0; i < steps_num; i++) {
-      immRecti(pos, startx, start, startx + U.pixelsize, start - dash.step_len 
+ dash.gap_len);
-      start -= dash.step_len;
-    }
-  }
-}
-
-#endif /* if 0 */
-
 static bool subtree_contains_object(ListBase *lb)
 {
   LISTBASE_FOREACH (TreeElement *, te, lb) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to