Skip to main content
Version: bleeding-edge 🩸

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.

🧑‍💻API Source
The methods, properties and events descriptions from this page are defined in our GitHub API Repository!
👪Base Class
This is a Base Class. Base Classes are abstract definitions used to share common methods and events between related child classes, thus you cannot spawn it directly.

Classes that share methods and events from this Base Class: Billboard, Blueprint, Cable, Character, CharacterSimple, Decal, Grenade, Melee, Prop, StaticMesh, TextRender, VehicleWheeled, VehicleWater, Weapon.

🦠 Functions

ReturnsNameDescription
ResetMaterialResets the material from the specified index to the original one
SetMaterialSets the material at the specified index of this Actor
SetMaterialColorParameterSets a Color parameter in this Actor's material
SetMaterialFromCanvasSets the material at the specified index of this Actor to a Canvas object
SetMaterialFromSceneCaptureSets the material at the specified index of this Actor to a SceneCapture object
SetMaterialFromWebUISets the material at the specified index of this Actor to a WebUI object
SetMaterialScalarParameterSets a Scalar parameter in this Actor's material
SetMaterialTextureParameterSets a texture parameter in this Actor's material to an image on disk
SetMaterialVectorParameterSets a Vector parameter in this Actor's material
SetPhysicalMaterialOverrides this Actor's Physical Material with a new one

ResetMaterial

Resets the material from the specified index to the original one

my_paintable:ResetMaterial(index?, attachable_id?)
TypeParameterDefaultDescription
integerindex?-1The material index to apply (-1 means all indices)
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to reset the material. Pass empty to reset on main mesh only

SetMaterial

Sets the material at the specified index of this Actor

my_paintable:SetMaterial(material_path, index?, attachable_id?)
TypeParameterDefaultDescription
Material Referencematerial_pathThe new Material to apply
integerindex?-1The material index to apply (-1 means all indices)
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material. Pass empty to set on main mesh only

SetMaterialColorParameter

Sets a Color parameter in this Actor's material

my_paintable:SetMaterialColorParameter(parameter_name, color, index?, attachable_id?)
TypeParameterDefaultDescription
stringparameter_nameThe name of the material parameter
ColorcolorThe value to set
integerindex?-1The material index to apply (-1 means all indices)
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only

SetMaterialFromCanvas

Sets the material at the specified index of this Actor to a Canvas object

my_paintable:SetMaterialFromCanvas(canvas, index?)
TypeParameterDefaultDescription
CanvascanvasThe Canvas object to use as a material
integerindex?-1The material 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?)
TypeParameterDefaultDescription
SceneCapturescene_captureThe SceneCapture object to use as a material
integerindex?-1The material 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?)
TypeParameterDefaultDescription
WebUIwebuiThe WebUI object to use as a material
integerindex?-1The material index to apply (-1 means all indices)

SetMaterialScalarParameter

Sets a Scalar parameter in this Actor's material

my_paintable:SetMaterialScalarParameter(parameter_name, scalar, index?, attachable_id?)
TypeParameterDefaultDescription
stringparameter_nameThe name of the material parameter
floatscalarThe value to set
integerindex?-1The material index to apply (-1 means all indices)
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only

SetMaterialTextureParameter

Sets a texture parameter in this Actor's material to an image on disk

my_paintable:SetMaterialTextureParameter(parameter_name, texture_path, index?, attachable_id?)
TypeParameterDefaultDescription
stringparameter_nameThe name of the material parameter
Image Pathtexture_pathThe path to the texture
integerindex?-1The material index to apply (-1 means all indices)
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only

SetMaterialVectorParameter

Sets a Vector parameter in this Actor's material

my_paintable:SetMaterialVectorParameter(parameter_name, vector, index?, attachable_id?)
TypeParameterDefaultDescription
stringparameter_nameThe name of the material parameter
VectorvectorThe value to set
integerindex?-1The material index to apply (-1 means all indices)
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to apply the material parameter. Pass empty to set on main mesh only

SetPhysicalMaterial

Overrides this Actor's Physical Material with a new one

my_paintable:SetPhysicalMaterial(physical_material_path)
TypeParameterDefaultDescription
Material Referencephysical_material_pathThe Physical Material to override