[Bf-blender-cvs] [5bfa7e48f41] temp-lineart-embree: Fix Outliner highlighting multiple base elements in different libraries

Julian Eisel noreply at git.blender.org
Sat Mar 26 17:10:59 CET 2022


Commit: 5bfa7e48f41f5215d27c6d6c89fa78c87fd71600
Author: Julian Eisel
Date:   Fri Mar 25 19:00:04 2022 +0100
Branches: temp-lineart-embree
https://developer.blender.org/rB5bfa7e48f41f5215d27c6d6c89fa78c87fd71600

Fix Outliner highlighting multiple base elements in different libraries

In the Blender File display mode of the Outliner, mouse hovering a
"base" element (e.g. "Objects", "Materials", ...) would also highlight
that same base element in other libraries linked into the scene. In fact
operations like (un)collapsing would be applied to both too.
Issue was that we'd always use the listbase containing the data-blocks
from the current main as a way to identify the tree element. So for the
same data-block types we'd use the same listbase pointers. Instead use
the the library pointer + a per library index.

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

M	source/blender/editors/space_outliner/tree/tree_display_libraries.cc

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

diff --git a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc
index 0023b7c7b62..476bbdb63ae 100644
--- a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc
+++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc
@@ -150,7 +150,7 @@ TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, ListBase
         }
         else {
           ten = outliner_add_element(
-              &space_outliner_, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0);
+              &space_outliner_, &tenlib->subtree, lib, nullptr, TSE_ID_BASE, a);
           ten->directdata = lbarray[a];
           ten->name = outliner_idcode_to_plural(GS(id->name));
         }



More information about the Bf-blender-cvs mailing list