Skip to content


Extends: Tool < Object


The tool used to edit the materials.

Accessed by Global.Editor.Tools["MaterialBrush"].


Texture Texture
MaterialMesh Mesh
int Size
OptionButton LayerMenu
int ActiveLayer
bool Smooth
bool MoveToFront
GridMenu textureMenu


float UpdateBrushRadius ( )
void SetMaterial ( Texture texture )
void SetLayer ( int index )
void SetSmooth ( bool value )

Property Descriptions

  • Texture Texture:
    Gets or sets the next material's texture/style.

  • int Size:
    Get or set the size of the brush.

  • OptionButton LayerMenu:
    The reference to the layer menu in the Material Brush when it is active.

  • int ActiveLayer:
    The layer the next material will be placed. Read only. Set with SetLayer() instead.

  • bool Smooth:
    Smooths rough edges in the material. Call SetSmooth() to set instead.

  • bool MoveToFront:
    When the user next paints, the painted material will get moved to the front of the canvas.

  • GridMenu textureMenu:
    The menu that selects textures for this tool. DO NOT MODIFY.

Method Descriptions

  • float UpdateBrushRadius ( ):
    Update the brush cursor to reflect the new size. Automatically called when Size is set. Returns the radius.

  • void SetLayer ( int index ):
    Change the layer the tool will be editing.

  • void SetSmooth ( bool value ):
    Toggles if the currently edited material and layer combination will be smoothed.