diff options
| author | Alfred Reinold Baudisch <[email protected]> | 2023-05-07 10:33:14 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-07 10:33:14 +0200 |
| commit | 53b7b26c45867e8b373ae1f9ab302117d3ba047d (patch) | |
| tree | 3f9ca29b2a9deaf557227dd7673f67b29aae8c76 /src/rmodels.c | |
| parent | de748dfffefeba1ba9bcf0c90c538d32c9cb2020 (diff) | |
| download | raylib-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.c | 3 |
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 *)); |
