diff options
Diffstat (limited to 'source/blender/editors')
3 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_element.cc b/source/blender/editors/space_outliner/tree/tree_element.cc index 116a2e4d3c3..d537bdfc99c 100644 --- a/source/blender/editors/space_outliner/tree/tree_element.cc +++ b/source/blender/editors/space_outliner/tree/tree_element.cc @@ -18,6 +18,7 @@ * \ingroup spoutliner */ +#include "DNA_anim_types.h" #include "DNA_listBase.h" #include "tree_element_anim_data.hh" @@ -44,7 +45,7 @@ static AbstractTreeElement *tree_element_create(int type, TreeElement &legacy_te case TSE_SOME_ID: return TreeElementID::createFromID(legacy_te, id); case TSE_ANIM_DATA: - return new TreeElementAnimData(legacy_te, id); + return new TreeElementAnimData(legacy_te, *reinterpret_cast<IdAdtTemplate &>(id).adt); case TSE_DRIVER_BASE: return new TreeElementDriverBase(legacy_te, *static_cast<AnimData *>(idv)); case TSE_NLA: diff --git a/source/blender/editors/space_outliner/tree/tree_element_anim_data.cc b/source/blender/editors/space_outliner/tree/tree_element_anim_data.cc index 5a9568ea906..c0fef7c98e2 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_anim_data.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_anim_data.cc @@ -32,8 +32,8 @@ namespace blender::ed::outliner { -TreeElementAnimData::TreeElementAnimData(TreeElement &legacy_te, ID &id) - : AbstractTreeElement(legacy_te), anim_data_(*reinterpret_cast<IdAdtTemplate &>(id).adt) +TreeElementAnimData::TreeElementAnimData(TreeElement &legacy_te, AnimData &anim_data) + : AbstractTreeElement(legacy_te), anim_data_(anim_data) { BLI_assert(legacy_te.store_elem->type == TSE_ANIM_DATA); /* this element's info */ diff --git a/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh b/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh index 8114277b6d6..95d08cd20b7 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh +++ b/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh @@ -30,7 +30,7 @@ class TreeElementAnimData final : public AbstractTreeElement { AnimData &anim_data_; public: - TreeElementAnimData(TreeElement &legacy_te, ID &id); + TreeElementAnimData(TreeElement &legacy_te, AnimData &anim_data); void expand(SpaceOutliner &space_outliner) const override; |