natiny.material.add_tag
natiny.material.add_tag(material, tag)
Adds a tag used by tagged draw passes to select models.
Parameters
| Name | Type | Description |
|---|---|---|
material |
number |
Material handle |
tag |
string |
Tag name |
Example
natiny.material.add_tag(glass, "world")
Notes
- A material may have multiple tags. Lua can also assign one tag or a list of tags when calling natiny.material.create.
- Adding the same tag twice does nothing.
- An empty tag is ignored. A material with no tags is not selected by natiny.render.tag.
- Only the material set on the model with natiny.model.set_material is read for selection; per-part overrides are not.