Merge pull request #3659 from gongminmin/FixAnimName

Export the animation name to gltf2
pull/3665/head
Kim Kulling 2021-02-23 20:39:16 +01:00 committed by GitHub
commit 3c79b12e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1388,6 +1388,7 @@ void glTF2Exporter::ExportAnimations()
nameAnim = anim->mName.C_Str(); nameAnim = anim->mName.C_Str();
} }
Ref<Animation> animRef = mAsset->animations.Create(nameAnim); Ref<Animation> animRef = mAsset->animations.Create(nameAnim);
animRef->name = nameAnim;
for (unsigned int channelIndex = 0; channelIndex < anim->mNumChannels; ++channelIndex) { for (unsigned int channelIndex = 0; channelIndex < anim->mNumChannels; ++channelIndex) {
const aiNodeAnim* nodeChannel = anim->mChannels[channelIndex]; const aiNodeAnim* nodeChannel = anim->mChannels[channelIndex];