MultiMaterial : Material

Constructor

multimaterial  [ numsubs:<integer> ]

multiSubMaterial  [ numsubs:<integer> ]

Properties

<multimaterial>.numsubs

<multisubmaterial>.numsubs

the number of sub-materials in the multimaterial.

<multimaterial>.materialList  ArrayParameter  default: #(Standard, Standard, ... Standard, Standard)

<multisubmaterial>.materialList  ArrayParameter  default: #(Standard, Standard, ... Standard, Standard)

Stores the Material for each sub-material.

<multimaterial>.mapEnabled    ArrayParameter  default: #(true, true, ...  true, true)

<multisubmaterial>.mapEnabled    ArrayParameter  default: #(true, true, ...  true, true)

Stores whether the sub-material is enabled.

<multimaterial>.names         ArrayParameter  default: #("", "", ... "", "")

<multisubmaterial>.names         ArrayParameter  default: #("", "", ... "", "")

Stores the sub-material slot name (not the sub-material name).

<Multimaterial>.materialIDList     ArrayParameter    default: #(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)   --  int array; Index

<Multisubmaterial>.materialIDList     ArrayParameter    default: #(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)   --  int array; Index

Stores the sub-material ID's.

<Multimaterial>.material1     Standardmaterial    default: Standard   --  alias for materialList[0]; SubAnim

<Multisubmaterial>.material1     Standardmaterial    default: Standard   --  alias for materialList[0]; SubAnim

Stores the material.

Notes

MultiSubMaterial is obsolete and is visible only for backward compatibility.

Each of the arrays contains numsubs elements. The materialList array stores the Material for each sub-material, the mapEnabled array stores whether that sub-material is enabled, and the names array stores the sub-material slot name (not the sub-material name).

MultiMaterials have sub-materials arranged in a table, so MAXScript also allows you to access these sub-materials using the array indexing accessor:

mm = multimaterial numsubs:3

mm[1] = $foo.material

$baz.material = mm[2]

If the numsubs named parameter is not specified, the default numsubs value is 10.

The number of sub-materials can be changed after material creation by changing the numsubs property value.

The number of sub-materials can also be changed by setting the count property for the materialList, mapEnabled, or names property to the desired number.

material1 is an alias for materialList[1].

See also