| 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 |
nothing calls this directly
no test coverage detected