MAXScript Tools and Interaction with 3ds Max > Interacting with the 3ds Max User Interface > Material Editor >

# MatEditor - Open and Close the Material Editor

Provides properties and methods to open and close the Material Editor, query whether it is open and get and set its mode. These methods apply to both the Compact (Legacy) Material Editor and the Schematic Material Editor introduced in 3ds Max 2011.

Properties:

    MatEditor.mode

Get/set the Material Editor Mode. Available in 3ds Max 2011 and higher.

Possible values are:

#basic- Compact (legacy) Material Editor.

#advanced - Slate Material Editor.

This property duplicates the maxOps.mtldlgMode property's functionality, but does not accept integer values (0 or 1) in place of the #basic and #advanced enums. It is provided in the MatEditor struct for convenience.

Methods:

    MatEditor.Open()

Opens the Compact Material Editor or Slate Material Editor, depending on the current mode (see property above).

    <bool>MatEditor.isOpen()

Returns true if either the Compact or the Slate Material Editor is open.

Returns false if the Material Editor is closed.

    MatEditor.Close()

Closes the Material Editor regardless of its mode.

Related Methods:

    SME.Open()

NEW in 3ds Max 2011: Opens specifically the Slate Material Editor.

If the Compact Material Editor is open, it will be closed automatically.

See Interface: SME for all SME-related methods.

#### See Also

- Material Editor

- Interface: medit

- maxOps Material Editor Mode

- Interface: SME