MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / SetSequence

Method SetSequence

src/Nazara/Graphics/SkeletalModel.cpp:359–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357 */
358
359 bool SkeletalModel::SetSequence(const String& sequenceName)
360 {
361 ///TODO: Make this error "safe" with the new system of error handling (No-log)
362 #if NAZARA_GRAPHICS_SAFE
363 if (!m_animation)
364 {
365 NazaraError("Model has no animation");
366 return false;
367 }
368 #endif
369
370 const Sequence* currentSequence = m_animation->GetSequence(sequenceName);
371 #if NAZARA_GRAPHICS_SAFE
372 if (!currentSequence)
373 {
374 NazaraError("Sequence not found");
375 return false;
376 }
377 #endif
378
379 m_currentSequence = currentSequence;
380 m_nextFrame = m_currentSequence->firstFrame;
381
382 return true;
383 }
384
385 /*!
386 * \brief Sets the sequence for the model

Callers

nothing calls this directly

Calls 1

GetSequenceMethod · 0.80

Tested by

no test coverage detected