Outliner: Don't show empty base elements in the library overrides mode
In the library overrides mode, in some situations there would be empty base elements like "Collections" or "Objects". Don't show them, it's confusing wihout use. Code just failed to consider that case.
This commit is contained in:
parent
511dfb7743
commit
a6214ce7ac
Notes:
blender-bot
2024-04-11 14:26:06 +02:00
Referenced by issue #95802, Library Override - Outliner UI/UX
|
@ -104,6 +104,13 @@ ListBase TreeDisplayOverrideLibrary::add_library_contents(Main &mainvar)
|
|||
}
|
||||
}
|
||||
|
||||
/* Remove ID base elements that turn out to be empty. */
|
||||
LISTBASE_FOREACH_MUTABLE (TreeElement *, te, &tree) {
|
||||
if (BLI_listbase_is_empty(&te->subtree)) {
|
||||
outliner_free_tree_element(te, &tree);
|
||||
}
|
||||
}
|
||||
|
||||
return tree;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue