Skip to content

Commit

Permalink
Enable animation names for the m3d model format. (raysan5#3714)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolunmi authored Jan 11, 2024
1 parent 482722d commit 9d628d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -6050,7 +6050,8 @@ static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCou
animations[a].boneCount = m3d->numbone + 1;
animations[a].bones = RL_MALLOC((m3d->numbone + 1)*sizeof(BoneInfo));
animations[a].framePoses = RL_MALLOC(animations[a].frameCount*sizeof(Transform *));
// strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
animations[a].name[sizeof(animations[a].name) - 1] = '\0';
TRACELOG(LOG_INFO, "MODEL: [%s] animation #%i: %i msec, %i frames", fileName, a, m3d->action[a].durationmsec, animations[a].frameCount);

for (i = 0; i < (int)m3d->numbone; i++)
Expand Down

0 comments on commit 9d628d1

Please sign in to comment.