Defined in:Sets a material object.
void SetMaterialObject(int32 index, MaterialObject *object);
||The index of the material slot to which a material object is to be assigned.|
||The new material object. This can be |
SetMaterialObjectfunction assigns the material object specified by the
objectparameter to a geometry node in the material slot specified by the
nullptr, then the geometry node does not have a material in the specified material slot after this function is called. Otherwise, the reference count of the material object is incremented, and the new material object is assigned to the geometry node. The reference count of any material object previously assigned to the geometry node in the same slot is decremented, and the old material object is deleted if its reference count reaches zero.
The number of material slots can be determined using the