Fix T63451: selected objects not highlighted in outliner scene view.
authorHarley Acheson <harley>
Thu, 11 Apr 2019 10:57:02 +0000 (12:57 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 11 Apr 2019 10:58:27 +0000 (12:58 +0200)
Differential Revision: https://developer.blender.org/D4668

source/blender/editors/space_outliner/outliner_draw.c

index 99d4c58..ff0b9d8 100644 (file)
@@ -1748,7 +1748,7 @@ static void outliner_draw_tree_element(
                        }
                        else if (te->idcode == ID_OB) {
                                Object *ob = (Object *)tselem->id;
-                               Base *base = (Base *)te->directdata;
+                               Base *base = BKE_view_layer_base_find(view_layer, ob);
                                const bool is_selected = (base != NULL) && ((base->flag & BASE_SELECTED) != 0);
 
                                if (ob == obact || is_selected) {