Passer au contenu principal
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.

info

Ceci est une classe de base. Vous ne pouvez pas la créer directement.

🦠 Functions

ReturnsNameDescription
SetMaterialSets the material at the specified index of this Actor
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
ResetMaterialResets the material from the specified index to the original one
SetMaterialColorParameterSets a Color parameter in this Actor's material
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

SetMaterial

Sets the material at the specified index of this Actor
my_entity:SetMaterial(material_path, index?)
TypeParameterDefaultDescription
Material Reference material_pathThe new Material to apply
number index?-1The 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?)
TypeParameterDefaultDescription
Canvas canvasThe Canvas object to use as a materia
number index?-1The 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(scene_capture, index?)
TypeParameterDefaultDescription
SceneCapture scene_captureThe SceneCapture object to use as a material
number index?-1The 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?)
TypeParameterDefaultDescription
WebUI webuiThe WebUI object to use as a material
number index?-1The index to apply
-1 means all indices

ResetMaterial

Resets the material from the specified index to the original one
my_entity:ResetMaterial(index?)
TypeParameterDefaultDescription
number index?-1The index to apply
-1 means all indices

SetMaterialColorParameter

Sets a Color parameter in this Actor's material
my_entity:SetMaterialColorParameter(parameter_name, color)
TypeParameterDefaultDescription
string parameter_nameThe name of the material parameter
Color colorThe value to set

SetMaterialScalarParameter

Sets a Scalar parameter in this Actor's material
my_entity:SetMaterialScalarParameter(parameter_name, scalar)
TypeParameterDefaultDescription
string parameter_nameThe name of the material parameter
string scalarThe 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)
TypeParameterDefaultDescription
string parameter_nameThe name of the material parameter
Image Path texture_pathThe path to the texture

SetMaterialVectorParameter

Sets a Vector parameter in this Actor's material
my_entity:SetMaterialVectorParameter(parameter_name, vector)
TypeParameterDefaultDescription
string parameter_nameThe name of the material parameter
Vector vectorThe value to set

SetPhysicalMaterial

Overrides this Actor's Physical Material with a new one
my_entity:SetPhysicalMaterial(physical_material_path)
TypeParameterDefaultDescription
Material Reference physical_material_pathThe Physical Material to override