natiny.model.get_mesh

Lua
natiny.model.get_mesh(model) -> mesh

Returns the mesh this model places, as the handle set_mesh was given.

Parameters

Name Type Description
model number Model handle

Returns

Type Description
number Mesh handle, or nil when the model is empty

Example

Lua
local mesh = natiny.model.get_mesh(hero)
print(natiny.mesh.get_bone_count(mesh) .. " bones")