- renamed "bone" anims and associated structures to generic "node" anims. Breaking change, sorry for that.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@166 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
ulfjorensen
2008-09-30 13:05:48 +00:00
parent 832f9cf672
commit 8925813026
15 changed files with 140 additions and 145 deletions

View File

@@ -420,15 +420,15 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
// duration will be determined by the maximum length
nanim->mDuration = 0;
nanim->mTicksPerSecond = pData->mAnimTicksPerSecond;
nanim->mNumBones = (unsigned int)anim->mAnims.size();
nanim->mBones = new aiBoneAnim*[nanim->mNumBones];
nanim->mNumChannels = (unsigned int)anim->mAnims.size();
nanim->mChannels = new aiNodeAnim*[nanim->mNumChannels];
for( unsigned int b = 0; b < anim->mAnims.size(); b++)
{
const XFile::AnimBone* bone = anim->mAnims[b];
aiBoneAnim* nbone = new aiBoneAnim;
nbone->mBoneName.Set( bone->mBoneName);
nanim->mBones[b] = nbone;
aiNodeAnim* nbone = new aiNodeAnim;
nbone->mNodeName.Set( bone->mBoneName);
nanim->mChannels[b] = nbone;
// apply the LH->RH conversion if the animation affects the root bone
bool isRootAnim = (bone->mBoneName == pScene->mRootNode->mName.data);