natiny_animation_get_name

C
const char* natiny_animation_get_name(NatinyAnimation animation);

Returns the name the glTF file gave this clip, which is the name natiny_mesh_find_animation looks up.

Parameters

Name Type Description
animation NatinyAnimation Animation handle from natiny_mesh_get_animation or natiny_mesh_find_animation

Returns

Type Description
const char* Null-terminated name owned by the clip, or NULL for an invalid handle

Example

C
NatinyAnimation first = natiny_mesh_get_animation(hero_mesh, 0);
printf("%s\n", natiny_animation_get_name(first));

Notes

  • The string belongs to the clip and is valid until the mesh it was read with is destroyed or reloaded. Copy it to keep it.