56 if (owner_id ==
nullptr && create_data ==
nullptr) {
77 return std::make_unique<TreeElementLabel>(legacy_te,
static_cast<const char *
>(create_data));
79 return std::make_unique<TreeElementAnimData>(legacy_te,
80 *
static_cast<AnimData *
>(create_data));
82 return std::make_unique<TreeElementDriverBase>(legacy_te,
83 *
static_cast<AnimData *
>(create_data));
85 return std::make_unique<TreeElementNLA>(legacy_te, *
static_cast<AnimData *
>(create_data));
87 return std::make_unique<TreeElementNLATrack>(legacy_te,
88 *
static_cast<NlaTrack *
>(create_data));
90 return std::make_unique<TreeElementNLAAction>(legacy_te,
91 *
reinterpret_cast<bAction *
>(owner_id));
93 return std::make_unique<TreeElementGPencilLayer>(legacy_te,
96 return std::make_unique<TreeElementGreasePencilNode>(
101 return std::make_unique<TreeElementViewLayerBase>(legacy_te,
102 *
reinterpret_cast<Scene *
>(owner_id));
104 return std::make_unique<TreeElementViewLayer>(
105 legacy_te, *
reinterpret_cast<Scene *
>(owner_id), *
static_cast<ViewLayer *
>(create_data));
107 return std::make_unique<TreeElementCollectionBase>(legacy_te,
108 *
reinterpret_cast<Scene *
>(owner_id));
110 return std::make_unique<TreeElementSceneObjectsBase>(legacy_te,
111 *
reinterpret_cast<Scene *
>(owner_id));
113 return std::make_unique<TreeElementOverridesBase>(legacy_te, *owner_id);
115 return std::make_unique<TreeElementOverridesProperty>(
118 return std::make_unique<TreeElementOverridesPropertyOperation>(
121 return std::make_unique<TreeElementRNAStruct>(legacy_te,
124 return std::make_unique<TreeElementRNAProperty>(
127 return std::make_unique<TreeElementRNAArrayElement>(
130 return std::make_unique<TreeElementSequence>(legacy_te,
131 *
static_cast<Sequence *
>(create_data));
133 return std::make_unique<TreeElementSequenceStrip>(legacy_te,
134 *
static_cast<Strip *
>(create_data));
136 return std::make_unique<TreeElementSequenceStripDuplicate>(
137 legacy_te, *
static_cast<Sequence *
>(create_data));
139 return std::make_unique<TreeElementBone>(
140 legacy_te, *owner_id, *
static_cast<Bone *
>(create_data));
142 return std::make_unique<TreeElementEditBone>(
143 legacy_te, *owner_id, *
static_cast<EditBone *
>(create_data));
145 return std::make_unique<TreeElementGPencilEffect>(legacy_te,
146 *
reinterpret_cast<Object *
>(owner_id),
149 return std::make_unique<TreeElementGPencilEffectBase>(legacy_te,
150 *
reinterpret_cast<Object *
>(owner_id));
152 return std::make_unique<TreeElementDeformGroupBase>(legacy_te,
153 *
reinterpret_cast<Object *
>(owner_id));
155 return std::make_unique<TreeElementDeformGroup>(legacy_te,
156 *
reinterpret_cast<Object *
>(owner_id),
159 return std::make_unique<TreeElementParticleSystem>(
161 *
reinterpret_cast<Object *
>(owner_id),
164 return std::make_unique<TreeElementConstraintBase>(legacy_te,
165 *
reinterpret_cast<Object *
>(owner_id));
167 return std::make_unique<TreeElementConstraint>(legacy_te,
168 *
reinterpret_cast<Object *
>(owner_id),
171 return std::make_unique<TreeElementPoseBase>(legacy_te,
172 *
reinterpret_cast<Object *
>(owner_id));
174 return std::make_unique<TreeElementPoseChannel>(legacy_te,
175 *
reinterpret_cast<Object *
>(owner_id),
178 return std::make_unique<TreeElementModifierBase>(legacy_te,
179 *
reinterpret_cast<Object *
>(owner_id));
181 return std::make_unique<TreeElementModifier>(
183 *
reinterpret_cast<Object *
>(owner_id),
186 return std::make_unique<TreeElementLinkedNodeTree>(legacy_te, *owner_id);
188 return std::make_unique<TreeElementLinkedObject>(legacy_te, *owner_id);
190 return std::make_unique<TreeElementViewCollectionBase>(legacy_te,
191 *
reinterpret_cast<Scene *
>(owner_id));
193 return std::make_unique<TreeElementLayerCollection>(
197 return std::make_unique<TreeElementBoneCollectionBase>(
198 legacy_te, *
reinterpret_cast<bArmature *
>(owner_id));
200 return std::make_unique<TreeElementBoneCollection>(
202 *
reinterpret_cast<bArmature *
>(owner_id),