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
This commit is contained in:
Pratik Borhade
2025-09-26 13:11:33 +02:00
committed by Pratik Borhade
parent eca7056cfe
commit 8e992a15e8

View File

@@ -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<ID *>(lib), nullptr, nullptr, TSE_ID_BASE, a);
ten->directdata = lbarray[a];