Skip to content
lsl.devlsl.devLSL Dev

llSetLinkGLTFOverrides

function
Function syntax
llSetLinkGLTFOverrides(
  1. integer link,// Link number (1 for root, >1 for children) or a LINK_* flag. Values: Links
  2. integer face,// Face number or ALL_SIDES. Values: Faces
  3. list params// A list of overrides and their corresponding values to set.
);
Energy
10

Sets or removes individual GLTF override parameters specified by params on face of the linked prim link.

Sets or removes individual overrides applied to a PBR texture on a face

How to use
llSetLinkGLTFOverrides(0, 0, []);
From the LSL definitions: GLTFOverride (rule, then its arguments)
// Colour and alphaOVERRIDE_GLTF_BASE_COLOR_FACTOR, vector  // base colour tint, linear RGB (llsRGB2Linear)OVERRIDE_GLTF_BASE_ALPHA, float  // used only with PRIM_GLTF_ALPHA_MODE_BLENDOVERRIDE_GLTF_BASE_ALPHA_MODE, integer  // PRIM_GLTF_ALPHA_MODE_*OVERRIDE_GLTF_BASE_ALPHA_MASK, float  // alpha cutoff for _MASK// SurfaceOVERRIDE_GLTF_METALLIC_FACTOR, float  // 0 to 1OVERRIDE_GLTF_ROUGHNESS_FACTOR, float  // 0 to 1OVERRIDE_GLTF_EMISSIVE_FACTOR, vector  // emissive tint, linear RGBOVERRIDE_GLTF_BASE_DOUBLE_SIDED, integer  // TRUE renders both sides

Passing an empty string ("") as the override value will clear that override.

Toggle alpha on\off
integer toggle;
default
{
touch_start(integer num_detected)
{
toggle=!toggle;
llSetLinkGLTFOverrides( LINK_THIS, 0, [
OVERRIDE_GLTF_BASE_ALPHA_MODE, PRIM_GLTF_ALPHA_MODE_BLEND,
OVERRIDE_GLTF_BASE_ALPHA, toggle]);
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.