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.
Base ClassAPI Source
👪Base Class
This is a Base Class, an abstract definition that shares common methods and events with it's child classes. You cannot spawn it, and you cannot call anything on the Base Class name itself. Use any class that inherits it.
Classes that share methods and events from this Base Class: Billboard, Blueprint, Cable, Character, CharacterSimple, Decal, Grenade, InstancedStaticMesh, Melee, Prop, StaticMesh, Text3D, VehicleWheeled, VehicleWater, Weapon.
Classes that share methods and events from this Base Class: Billboard, Blueprint, Cable, Character, CharacterSimple, Decal, Grenade, InstancedStaticMesh, Melee, Prop, StaticMesh, Text3D, VehicleWheeled, VehicleWater, Weapon.
🦠 Functions
| Returns | Name | Description | |
|---|---|---|---|
| Color | GetMaterialColorParameter | Gets a Color parameter from this Actor's material | |
| float | GetMaterialScalarParameter | Gets a Scalar parameter from this Actor's material | |
| string | GetMaterialTextureParameter | Gets a Texture parameter from this Actor's material | |
| Vector | GetMaterialVectorParameter | Gets a Vector parameter from this Actor's material | |
ResetMaterial | Resets the material from the specified index to the original one | ||
SetMaterial | Sets the material at the specified index of this Actor | ||
SetMaterialColorParameter | Sets a Color parameter in this Actor's material | ||
SetMaterialFromCanvas | Définit le matériau à l'index spécifié de cet acteur sur un objet Canvas | ||
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 | ||
SetMaterialScalarParameter | Définit un paramètre "Scalar" sur le matériau de cet acteur | ||
SetMaterialTextureParameter | Sets a texture parameter in this Actor's material to an image | ||
SetMaterialVectorParameter | Définit un paramètre "Vector" sur le matériau de cet acteur | ||
SetPhysicalMaterial | Overrides this Actor's Physical Material with a new one |
Optimal

GetMaterialColorParameter
Gets a Color parameter from this Actor's material
local color = my_paintable:GetMaterialColorParameter(parameter_name, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| integer | index? | -1 | The material index to get |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only |
Returns
| Type | Description |
|---|---|
| Color | or nil if parameter was not found |
See also SetMaterialColorParameter.
Optimal

GetMaterialScalarParameter
Gets a Scalar parameter from this Actor's material
local scalar = my_paintable:GetMaterialScalarParameter(parameter_name, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| integer | index? | -1 | The material index to get |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only |
Returns
| Type | Description |
|---|---|
| float | or nil if parameter was not found |
See also SetMaterialScalarParameter.
Optimal

GetMaterialTextureParameter
Gets a Texture parameter from this Actor's material
local texture = my_paintable:GetMaterialTextureParameter(parameter_name, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| integer | index? | -1 | The material index to get |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only |
Returns
| Type | Description |
|---|---|
| string | or nil if parameter was not found |
See also SetMaterialTextureParameter.
Optimal

GetMaterialVectorParameter
Gets a Vector parameter from this Actor's material
local vector = my_paintable:GetMaterialVectorParameter(parameter_name, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| integer | index? | -1 | The material index to get |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only |
Returns
| Type | Description |
|---|---|
| Vector | or nil if parameter was not found |
See also SetMaterialVectorParameter.
Moderate

ResetMaterial
Resets the material from the specified index to the original one
my_paintable:ResetMaterial(index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | index? | -1 | The material index to apply (-1 means all indices) |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to reset the material. Pass empty to reset on main mesh only |
Slow

SetMaterial
Sets the material at the specified index of this Actor
my_paintable:SetMaterial(material_path, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Material Reference | material_path | Required parameter | The new Material to apply. Note: depending on the entity you are applying, the material needs to be configured to be "Used with Skeletal Mesh" or "Used with Particles", etc. in the material settings, otherwise it may not be applied correctly |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material. Pass empty to set on main mesh only |
Moderate

SetMaterialColorParameter
Sets a Color parameter in this Actor's material
my_paintable:SetMaterialColorParameter(parameter_name, color, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| Color | color | Required parameter | La valeur à définir |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only |
See also GetMaterialColorParameter.
Moderate

SetMaterialFromCanvas
Définit le matériau à l'index spécifié de cet acteur sur un objet Canvas
my_paintable:SetMaterialFromCanvas(canvas, index?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Canvas | canvas | Required parameter | L'objet Canvas à utiliser comme matériau |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
Moderate

SetMaterialFromSceneCapture
Sets the material at the specified index of this Actor to a SceneCapture object
my_paintable:SetMaterialFromSceneCapture(scene_capture, index?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| SceneCapture | scene_capture | Required parameter | L'objet SceneCapture à utiliser comme matériau |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
Moderate

SetMaterialFromWebUI
Sets the material at the specified index of this Actor to a WebUI object
my_paintable:SetMaterialFromWebUI(webui, index?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| WebUI | webui | Required parameter | L'entité WebUI à utiliser comme matériau |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
Moderate

SetMaterialScalarParameter
Définit un paramètre "Scalar" sur le matériau de cet acteur
my_paintable:SetMaterialScalarParameter(parameter_name, scalar, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| float | scalar | Required parameter | La valeur à définir |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only |
See also GetMaterialScalarParameter.
Slow

SetMaterialTextureParameter
Sets a texture parameter in this Actor's material to an image
my_paintable:SetMaterialTextureParameter(parameter_name, texture_path, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| Image Path | texture_path | Required parameter | Le chemin d'accès vers la texture, url ou base64 |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only |
See also GetMaterialTextureParameter.
Optimal

SetMaterialVectorParameter
Définit un paramètre "Vector" sur le matériau de cet acteur
my_paintable:SetMaterialVectorParameter(parameter_name, vector, index?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | parameter_name | Required parameter | Le nom de ce paramètre de matériaux |
| Vector | vector | Required parameter | La valeur à définir |
| integer | index? | -1 | The material index to apply (-1 means all indices) |
| string | attachable_id? | | The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only |
See also GetMaterialVectorParameter.
Moderate

SetPhysicalMaterial
Overrides this Actor's Physical Material with a new one
my_paintable:SetPhysicalMaterial(physical_material_path)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Material Reference | physical_material_path | Required parameter | Le matériel physique à remplacer |


