Constructor
materialModifier ...
Properties
<Materialmodifier>.materialid Integer default: 1 -- animatable, alias: Material_ID
The material ID to be assigned. If the input object is in face sub-selection, then the ID is only applied to selected faces, otherwise it is applied to the entire object. The ID number refers to one of the materials in a multi/sub-object material.
Notes
The default modifier name used when creating a MaterialModifier modifier is "material". If you then try to access the modifier as a property of the node it is applied to, a name conflict occurs with the material property of nodes. To prevent this conflict, you should specify a name during MaterialModifier creation. For example:
addModifier myObj (materialModifier materialID:5 name:"MaterialMod")
See also
Modifier Common Properties, Operators, and Methods