Base Paintable
Base class for all Paintable entities. This class provides customization for materials, exposing common functions to allow you to set custom material parameters, including loading textures from disk.
info
This is a base class. You cannot spawn it directly.
Functions
Returns | Name | Description | |
---|---|---|---|
![]() | SetMaterial | Sets the material at the specified index of this Actor | |
SetMaterialFromCanvas | Sets the material at the specified index of this Actor to a Canvas object | ||
SetMaterialFromSceneCapture | Sets the material at the specified index of this Actor to a SceneCapture object | ||
SetMaterialFromWebUI | Sets the material at the specified index of this Actor to a WebUI object | ||
![]() | ResetMaterial | Resets the material from the specified index to the original one | |
![]() | SetMaterialColorParameter | Sets a Color parameter in this Actor's material | |
![]() | SetMaterialScalarParameter | Sets a Scalar parameter in this Actor's material | |
![]() | SetMaterialTextureParameter | Sets a texture parameter in this Actor's material to an image on disk | |
![]() | SetMaterialVectorParameter | Sets a Vector parameter in this Actor's material | |
![]() | SetPhysicalMaterial | Overrides this Actor's Physical Material with a new one |

SetMaterial
Sets the material at the specified index of this Actor
my_paintable:SetMaterial(material_path, index?)
Type | Parameter | Default | Description |
---|---|---|---|
Material Reference | material_path | The new Material to apply | |
integer | index? | -1 | The index to apply -1 means all indices |

SetMaterialFromCanvas
Sets the material at the specified index of this Actor to a Canvas object
my_paintable:SetMaterialFromCanvas(canvas, index?)
Type | Parameter | Default | Description |
---|---|---|---|
Canvas | canvas | The Canvas object to use as a materia | |
integer | index? | -1 | The index to apply -1 means all indices |

SetMaterialFromSceneCapture
Sets the material at the specified index of this Actor to a SceneCapture object
my_paintable:SetMaterialFromSceneCapture(scene_capture, index?)
Type | Parameter | Default | Description |
---|---|---|---|
SceneCapture | scene_capture | The SceneCapture object to use as a material | |
integer | index? | -1 | The index to apply -1 means all indices |

SetMaterialFromWebUI
Sets the material at the specified index of this Actor to a WebUI object
my_paintable:SetMaterialFromWebUI(webui, index?)
Type | Parameter | Default | Description |
---|---|---|---|
WebUI | webui | The WebUI object to use as a material | |
integer | index? | -1 | The index to apply -1 means all indices |

ResetMaterial
Resets the material from the specified index to the original one
my_paintable:ResetMaterial(index?)
Type | Parameter | Default | Description |
---|---|---|---|
integer | index? | -1 | The index to apply -1 means all indices |

SetMaterialColorParameter
Sets a Color parameter in this Actor's material
my_paintable:SetMaterialColorParameter(parameter_name, color)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter_name | The name of the material parameter | |
Color | color | The value to set |

SetMaterialScalarParameter
Sets a Scalar parameter in this Actor's material
my_paintable:SetMaterialScalarParameter(parameter_name, scalar)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter_name | The name of the material parameter | |
float | scalar | The value to set |

SetMaterialTextureParameter
Sets a texture parameter in this Actor's material to an image on disk
my_paintable:SetMaterialTextureParameter(parameter_name, texture_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter_name | The name of the material parameter | |
Image Path | texture_path | The path to the texture |

SetMaterialVectorParameter
Sets a Vector parameter in this Actor's material
my_paintable:SetMaterialVectorParameter(parameter_name, vector)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter_name | The name of the material parameter | |
Vector | vector | The value to set |

SetPhysicalMaterial
Overrides this Actor's Physical Material with a new one
my_paintable:SetPhysicalMaterial(physical_material_path)
Type | Parameter | Default | Description |
---|---|---|---|
Material Reference | physical_material_path | The Physical Material to override |