From 8e992a15e81541e501d10c364d3ba9b5c8a05443 Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Fri, 26 Sep 2025 13:11:33 +0200 Subject: [PATCH] UI: Outliner: Remove empty ID types from listing in Blender File view Empty idtypes are already handled to be excluded. Still empty group elements are generated When IDs are linked from other file. This is due to missing `id->lib` check. Without this, group element of respective ID is generated even when ID doesn't belong to that library. If `id->lib` isn't matching, skip creating group tree element for them. Resolves #145720 Pull Request: https://projects.blender.org/blender/blender/pulls/145779 --- .../editors/space_outliner/tree/tree_display_libraries.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 42e7ab00770..76cf9859a04 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc @@ -146,7 +146,7 @@ TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, ListBase if (filter_id_type) { ten = tenlib; } - else { + else if (id->lib == lib) { ten = add_element( &tenlib->subtree, reinterpret_cast(lib), nullptr, nullptr, TSE_ID_BASE, a); ten->directdata = lbarray[a];