assign_material
Assign a material to selected objects, replacing existing slots by default or adding an extra slot for multi-material use.
Instructions
Assign a material to objects.
By default this replaces every existing slot, which is what a single-material game prop wants. Pass replace=false to add a second material slot instead -- each extra slot is an extra draw call in most engines.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Object names. Omit to use the current selection. | |
| replace | No | Clear existing slots first; False appends a slot | |
| material | Yes | Material name | |
| slot_index | No | Write into this existing slot instead |