natiny_mesh_find_animation

C
NatinyAnimation natiny_mesh_find_animation(NatinyMesh mesh, const char* name);

Returns the clip of this name, or 0 when the file has none.

Parameters

Name Type Description
mesh NatinyMesh Mesh handle
name const char* Clip name as natiny_animation_get_name reports it; null-terminated and compared exactly

Returns

Type Description
NatinyAnimation Animation handle, or 0 when there is no such clip

Example

C
NatinyAnimation jump = natiny_mesh_find_animation(hero_mesh, "Jump");
if (jump) natiny_animator_play(hero_animator, jump, 0.2f);