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.
This commit is contained in:
Nathan Craddock
2020-07-29 21:46:04 -06:00
parent 4089b07aa0
commit f45f8a7a89

View File

@@ -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;
}