From f45f8a7a898575819a8c687ed6935ee94ddefa8e Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Wed, 29 Jul 2020 21:46:04 -0600 Subject: Fix T79278: Selected object filter skipping collection instances Collection instance datablocks were not filtered out when only showing the selected object. They were treated as a collection (which should show when filtering objects). Adds a case to check if the parent is an object. --- source/blender/editors/space_outliner/outliner_tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 09dc1320c3a..db42fb8f319 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2192,7 +2192,9 @@ static bool outliner_element_is_collection_or_object(TreeElement *te) if ((tselem->type == 0) && (te->idcode == ID_OB)) { return true; } - if (outliner_is_collection_tree_element(te)) { + + /* Collection instance datablocks should not be extracted. */ + if (outliner_is_collection_tree_element(te) && !(te->parent && te->parent->idcode == ID_OB)) { return true; } -- cgit v1.2.3