MCPcopy Create free account
hub / github.com/assimp/assimp / AnimationStack

Method AnimationStack

code/AssetLib/FBX/FBXAnimation.cpp:235–266  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

233
234// ------------------------------------------------------------------------------------------------
235AnimationStack::AnimationStack(uint64_t id, const Element &element, const std::string &name, const Document &doc) :
236 Object(id, element, name) {
237 const Scope &sc = GetRequiredScope(element);
238
239 // note: we don't currently use any of these properties so we shouldn't bother if it is missing
240 props = GetPropertyTable(doc, "AnimationStack.FbxAnimStack", element, sc, true);
241
242 // resolve attached animation layers
243 const std::vector<const Connection *> &conns = doc.GetConnectionsByDestinationSequenced(ID(), "AnimationLayer");
244 layers.reserve(conns.size());
245
246 for (const Connection *con : conns) {
247
248 // link should not go to a property
249 if (con->PropertyName().length()) {
250 continue;
251 }
252
253 const Object *const ob = con->SourceObject();
254 if (!ob) {
255 DOMWarning("failed to read source object for AnimationLayer->AnimationStack link, ignoring", &element);
256 continue;
257 }
258
259 const AnimationLayer *const anim = dynamic_cast<const AnimationLayer *>(ob);
260 if (!anim) {
261 DOMWarning("source object for ->AnimationStack link is not an AnimationLayer", &element);
262 continue;
263 }
264 layers.push_back(anim);
265 }
266}
267
268} // namespace FBX
269} // namespace Assimp

Callers

nothing calls this directly

Calls 8

GetPropertyTableFunction · 0.85
IDClass · 0.85
DOMWarningFunction · 0.85
SourceObjectMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected