MaterialSystem
Fields
This class has no fields.
Functions
FindMaterial
Name |
Type |
Description |
name |
string |
Name of material |
Return value
Name |
Type |
Description |
value |
IMaterial* |
IMaterial pointer |
local mat = MaterialSystem.FindMaterial("dev/glow_armsrace")
FindMaterial
Name |
Type |
Description |
name |
string |
Name of texture |
group |
string |
Texture group |
Return value
Name |
Type |
Description |
value |
ITexture* |
ITexture pointer |
local texture = MaterialSystem.FindTexture("_rt_FullFrameFB", "RenderTargets")
CreateMaterial
Return value
Name |
Type |
Description |
value |
IMaterial* |
IMaterial pointer |
local kv = KeyValues.LoadFromBuffer("testing_material", [[
"VertexLitGeneric"
{
"$basetexture" "nature/urban_puddle01a_ssbump"
"$additive" "1"
"$selfillum" "1"
"$nocull" "1"
"$wireframe" "1"
"Proxies"
{
"TextureScroll"
{
"texturescrollvar" "$BasetextureTransform"
"texturescrollrate" "0.5"
"texturescrollangle" "90"
}
}
}
]])
local mat = MaterialSystem.CreateMaterial("testing_material", kv)
FirstMaterial
This function has no parameters.
Return value
local handle = MaterialSystem.FirstMaterial()
NextMaterial
Return value
local handle = MaterialSystem.FirstMaterial()
local next_handle = MaterialSystem.NextMaterial(handle)
GetMaterial
Return value
Name |
Type |
Description |
value |
IMaterial* |
IMaterial pointer |
local handle = MaterialSystem.FirstMaterial()
local mat = MaterialSystem.GetMaterial(handle)
InvalidMaterial
This function has no parameters.
Return value
local invalid_handle = MaterialSystem.InvalidMaterial()