MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetCMFData

Method GetCMFData

trinity/Tr2GrannyAnimation.cpp:404–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404const cmf::Data* Tr2GrannyAnimation::GetCMFData() const
405{
406 if( m_grannyRes )
407 {
408 CCP_ASSERT( m_grannyRes->IsUsingCMF() );
409
410 // when using a standalone cmf file, it's supposed to have an animation
411 // track, so complain if it doesn't.
412 const cmf::Data* data = m_grannyRes->GetCMFData();
413 if( !data )
414 {
415 CCP_LOGERR( "'%s' is not a valid CMF file", m_resPath.c_str() );
416 }
417 return data;
418 }
419
420 // when using a shared geometryRes, there may not be an animation, or the
421 // granny file isn't loaded yet. Silently fail.
422 if( m_geometryRes )
423 {
424 return m_geometryRes->GetCMFData();
425 }
426 return nullptr;
427}
428
429const std::vector<int32_t>& Tr2GrannyAnimation::GetSkeletonBoneIndices()
430{

Callers 5

GetSecondaryCMFFileInfoFunction · 0.45
RebuildCachedDataMethod · 0.45
GetBoneTransformsMethod · 0.45
CreateBindingMethod · 0.45

Calls 1

IsUsingCMFMethod · 0.45

Tested by

no test coverage detected