summaryrefslogtreecommitdiffhomepage
path: root/src/rmodels.c
diff options
context:
space:
mode:
authorAlfred Reinold Baudisch <[email protected]>2023-05-07 10:33:14 +0200
committerGitHub <[email protected]>2023-05-07 10:33:14 +0200
commit53b7b26c45867e8b373ae1f9ab302117d3ba047d (patch)
tree3f9ca29b2a9deaf557227dd7673f67b29aae8c76 /src/rmodels.c
parentde748dfffefeba1ba9bcf0c90c538d32c9cb2020 (diff)
downloadraylib-53b7b26c45867e8b373ae1f9ab302117d3ba047d.tar.gz
raylib-53b7b26c45867e8b373ae1f9ab302117d3ba047d.zip
Added ModelAnimation.name, initially with GLTF animation names loaded (#3044)
Diffstat (limited to 'src/rmodels.c')
-rw-r--r--src/rmodels.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rmodels.c b/src/rmodels.c
index 34352ec1..1aa045df 100644
--- a/src/rmodels.c
+++ b/src/rmodels.c
@@ -5375,6 +5375,9 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, unsigned in
animDuration = (t > animDuration)? t : animDuration;
}
+ strncpy(animations[i].name, animData.name, sizeof(animations[i].name));
+ animations[i].name[sizeof(animations[i].name) - 1] = '\0';
+
animations[i].frameCount = (int)(animDuration*1000.0f/GLTF_ANIMDELAY);
animations[i].framePoses = RL_MALLOC(animations[i].frameCount*sizeof(Transform *));