llSetLinkGLTFOverrides
function
Function syntax
llSetLinkGLTFOverrides(integer link,// Link number (1 for root, >1 for children) or a LINK_* flag. Values: Linksinteger face,// Face number orALL_SIDES. Values: Faceslist 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
llSetLinkGLTFOverrides(0, 0, []);Specification
Section titled “Specification”// 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.
Caveats
Section titled “Caveats”OVERRIDE_GLTF_BASE_COLOR_FACTORandOVERRIDE_GLTF_BASE_ALPHAparameters are coupled. If an override is set for one parameter, then the other is automatically given an override. The defaultOVERRIDE_GLTF_BASE_COLOR_FACTORis<1,1,1>, and the defaultOVERRIDE_GLTF_BASE_ALPHAis 1.0.
Examples
Section titled “Examples”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]); }}See also
Section titled “See also”Functions
Section titled “Functions”LlGetPrimitiveParams— Gets the parameters set on a prim
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.