Load animation duration;

This commit is contained in:
bjorn 2017-11-03 18:37:12 -07:00
parent 34ddfbaed3
commit c87ed6aec3
2 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ typedef map_t(AnimationChannel) map_channel_t;
typedef struct {
const char* name;
float duration;
map_channel_t channels;
int channelCount;
} Animation;

View File

@ -391,6 +391,7 @@ ModelData* lovrModelDataCreate(Blob* blob) {
Animation animation;
animation.name = strdup(assimpAnimation->mName.data);
animation.duration = assimpAnimation->mDuration / (float) assimpAnimation->mTicksPerSecond;
animation.channelCount = assimpAnimation->mNumChannels;
map_init(&animation.channels);