Base Paintable
Base class for all Paintables
A Paintable class is a base class in nanos world which provides customization for materials, exposing common functions to allow you to set custom material parameters, including loading textures from disk.
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 | |
SetMaterialFromWebUI | Sets the material at the specified index of this Actor to a WebUI object | ||
SetMaterialFromSceneCapture | Sets the material at the specified index of this Actor to a SceneCapture 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_entity:SetMaterial(new_material, index)
Type | Parameter | Default | Description |
---|---|---|---|
Material Reference | material_path | The new Material to apply | |
number | 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_entity:SetMaterialFromCanvas(canvas, index)
Type | Parameter | Default | Description |
---|---|---|---|
Canvas | canvas | The Canvas object to use as a material | |
number | 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_entity:SetMaterialFromSceneCapture(webui, index)
Type | Parameter | Default | Description |
---|---|---|---|
SceneCapture | scene_capture | The SceneCapture object to use as a material | |
number | 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_entity:SetMaterialFromWebUI(webui, index)
Type | Parameter | Default | Description |
---|---|---|---|
WebUI | webui | The WebUI object to use as a material | |
number | index | -1 | The index to apply - -1 means all indices |

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

SetMaterialColorParameter
Sets a Color parameter in this Actor’s material
my_entity:SetMaterialColorParameter(parameter_name, color)
Type | Parameter | 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
For setting a parameter in an Attachable mesh, use the following parameter_name pattern:
attachable///[ATTACHABLE_ID]/[PARAMETER_NAME]
my_entity:SetMaterialScalarParameter(parameter_name, number)
Type | Parameter | Description |
---|---|---|
string | parameter_name | The name of the material parameter |
string | scalar | The value to set |

SetMaterialTextureParameter
Sets a texture parameter in this Actor's material to an image on disk
my_entity:SetMaterialTextureParameter(parameter_name, texture_path)
Type | Parameter | 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
For setting a parameter in an Attachable mesh, use the following parameter_name pattern:
attachable///[ATTACHABLE_ID]/[PARAMETER_NAME]
my_entity:SetMaterialVectorParameter(parameter_name, vector)
Type | Parameter | 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_entity:SetPhysicalMaterial(physical_material_path)
Type | Parameter | Description |
---|---|---|
Material Reference | physical_material_path | The Physical Material to override |