natiny.model.get_bone_count

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

Returns how many bones this model's skeleton has, which is the joint count of its mesh.

Parameters

Name Type Description
model number Model handle

Returns

Type Description
integer Bone count; 0 when the model's mesh has no skeleton

Example

Lua
for i = 0, natiny.model.get_bone_count(hero) - 1 do
    local bone = natiny.model.get_bone_at(hero, i)
end