mat_set_sub_material
Assign a sub-material to a specific slot (1-based) of a Multi/Sub-Object material, either by creating a new material class or reusing an existing source material.
Instructions
给 Multi/Sub-Object 材质的某个子槽(index,从 1 开始)设置子材质。可新建一个 subClass 材质,或复用已存在的 sourceMaterial。 [English] Set a sub-material (index, 1-based) of a Multi/Sub-Object material. Creates a new subClass material or reuses an existing sourceMaterial.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | 子槽编号,从 1 开始。 | Sub-slot index, 1-based. | |
| material | Yes | Multi/Sub-Object 材质名称。 | Multi/Sub-Object material name. | |
| subClass | No | 要新建的子材质类名,例如 Standardmaterial。 | Class name of a new sub-material, e.g. Standardmaterial. | |
| sourceMaterial | No | 改为复用已存在的材质名称。 | Reuse an existing material by name instead. |