Fix #118475: Regression: NLA/driver data missing in outliner

Caused by 0a633a4e07
NLA and driver tree-elements were not added to the outliner when
"action" is unlinked from the object. This is due to the wrong `if`
condition preventing the excution of `expand_drivers/expand_NLA_tracks`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118597
This commit is contained in:
Pratik Borhade
2024-02-23 12:07:40 +01:00
committed by Pratik Borhade
parent 199f8ad817
commit 80e7c04726

View File

@@ -31,17 +31,16 @@ TreeElementAnimData::TreeElementAnimData(TreeElement &legacy_te, AnimData &anim_
void TreeElementAnimData::expand(SpaceOutliner & /*space_outliner*/) const
{
if (!anim_data_.action) {
return;
}
/* Animation data-block itself. */
add_element(&legacy_te_.subtree,
reinterpret_cast<ID *>(anim_data_.action),
nullptr,
&legacy_te_,
TSE_SOME_ID,
0);
if (anim_data_.action) {
/* Animation data-block itself. */
add_element(&legacy_te_.subtree,
reinterpret_cast<ID *>(anim_data_.action),
nullptr,
&legacy_te_,
TSE_SOME_ID,
0);
}
expand_drivers();
expand_NLA_tracks();