natiny.mesh.get_bone_count

Lua
natiny.mesh.get_bone_count(mesh) -> count

Returns how many joints the mesh's skeleton has.

Parameters

Name Type Description
mesh number Mesh handle

Returns

Type Description
integer Joint count; 0 when the mesh has no skeleton

Example

Lua
for i = 0, natiny.mesh.get_bone_count(hero_mesh) - 1 do
    print(natiny.mesh.get_bone_name(hero_mesh, i))
end