MAXScript Language Reference > 3ds Max Objects > Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper > Modifier and SpacewarpModifier Types > Modifiers > Surface Modifiers >

# MaterialModifier : Modifier

    Materialmodifier - superclass: modifier; super-superclass:MAXWrapper - classID: #(1017362, 0)

Value > MAXWrapper > Modifier > MaterialModifier

| Modifier Classes - Quick Navigation

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.

NoteThe default modifier name used when creatinga 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

- MAXWrapper Common Properties, Operators, and Methods

- Value Common Properties, Operators, and Methods