natiny.mesh.get_part_count
natiny.mesh.get_part_count(mesh) -> count
Returns the number of mesh parts.
Parameters
| Name | Type | Description |
|---|---|---|
mesh |
number |
Mesh handle |
Returns
| Type | Description |
|---|---|
number |
Part count (0 if the handle is invalid) |
Example
local count = natiny.mesh.get_part_count(mesh)
Notes
- A part groups triangle primitives that share one source material. Part indexes are zero-based; generated shapes contain one part.