Skip to main content
Version: latest - a1.142.x โš–๏ธ

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 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, InstancedStaticMesh, Melee, Prop, StaticMesh, Text3D, VehicleWheeled, VehicleWater, Weapon.
๐Ÿง‘โ€๐Ÿ’ปAPI Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!

๐Ÿฆ ย Functionsโ€‹

ReturnsNameDescription
ColorGetMaterialColorParameterGets a Color parameter from this Actor's material
floatGetMaterialScalarParameterGets a Scalar parameter from this Actor's material
stringGetMaterialTextureParameterGets a Texture parameter from this Actor's material
VectorGetMaterialVectorParameterGets a Vector parameter from this Actor's material
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
SetMaterialVectorParameterSets a Vector parameter in this Actor's material
SetPhysicalMaterialOverrides this Actor's Physical Material with a new one

GetMaterialColorParameterโ€‹

Gets a Color parameter from this Actor's material
local color = my_paintable:GetMaterialColorParameter(parameter_name, index?, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
integerindex?-1The material index to get
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only

Returns

TypeDescription
Coloror nil if parameter was not found

See also SetMaterialColorParameter.


GetMaterialScalarParameterโ€‹

Gets a Scalar parameter from this Actor's material
local scalar = my_paintable:GetMaterialScalarParameter(parameter_name, index?, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
integerindex?-1The material index to get
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only

Returns

TypeDescription
floator nil if parameter was not found

See also SetMaterialScalarParameter.


GetMaterialTextureParameterโ€‹

Gets a Texture parameter from this Actor's material
local texture = my_paintable:GetMaterialTextureParameter(parameter_name, index?, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
integerindex?-1The material index to get
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only

Returns

TypeDescription
stringor nil if parameter was not found

See also SetMaterialTextureParameter.


GetMaterialVectorParameterโ€‹

Gets a Vector parameter from this Actor's material
local vector = my_paintable:GetMaterialVectorParameter(parameter_name, index?, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
integerindex?-1The material index to get
stringattachable_id?The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to get the material parameter. Pass empty to get from main mesh only

Returns

TypeDescription
Vectoror nil if parameter was not found

See also SetMaterialVectorParameter.


ResetMaterialโ€‹

Resets the material from the specified index to the original one
my_paintable:ResetMaterial(index?, attachable_id?)

Parameters

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?)

Parameters

TypeParameterDefaultDescription
Material Referencematerial_path Required parameter The 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?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
Colorcolor Required parameter The 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

See also GetMaterialColorParameter.


SetMaterialFromCanvasโ€‹

Sets the material at the specified index of this Actor to a Canvas object
my_paintable:SetMaterialFromCanvas(canvas, index?)

Parameters

TypeParameterDefaultDescription
Canvascanvas Required parameter The 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?)

Parameters

TypeParameterDefaultDescription
SceneCapturescene_capture Required parameter The 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?)

Parameters

TypeParameterDefaultDescription
WebUIwebui Required parameter The 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?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
floatscalar Required parameter The 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

See also GetMaterialScalarParameter.


SetMaterialTextureParameterโ€‹

Sets a texture parameter in this Actor's material to an image
my_paintable:SetMaterialTextureParameter(parameter_name, texture_path, index?, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
Image Pathtexture_path Required parameter The path to texture, a url or a base64
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

See also GetMaterialTextureParameter.


SetMaterialVectorParameterโ€‹

Sets a Vector parameter in this Actor's material
my_paintable:SetMaterialVectorParameter(parameter_name, vector, index?, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringparameter_name Required parameter The name of the material parameter
Vectorvector Required parameter The 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

See also GetMaterialVectorParameter.


SetPhysicalMaterialโ€‹

Overrides this Actor's Physical Material with a new one
my_paintable:SetPhysicalMaterial(physical_material_path)

Parameters

TypeParameterDefaultDescription
Material Referencephysical_material_path Required parameter The Physical Material to override