------------------------------------------------------------------------------------------------
| 233 | |
| 234 | // ------------------------------------------------------------------------------------------------ |
| 235 | AnimationStack::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 |
nothing calls this directly
no test coverage detected