llSetRenderMaterial
function
Function syntax
llSetRenderMaterial(string material,// Name of a material in the prim's inventory, or a UUID.integer face// Face number orALL_SIDES. Values: Faces
);- Delay
- 0.2 s
- Energy
- 10
Sets the material of this prim’s face. This function will clear most PRIM_GLTF_* properties on the face, with the exceptions of repeats, offsets, and rotation_in_radians.
llSetRenderMaterial("", 0);Caveats
Section titled “Caveats”- If material is provided as
NULL_KEY, the glTF Material is removed from face, reverting back to any underlying Blinn-Phong materials.
Examples
Section titled “Examples”Example 1
default{ state_entry() { // the first material alphabetically inside the same prim's inventory string material = llGetInventoryName(INVENTORY_MATERIAL, 0);
// set it on all sides of the prim containing the script llSetRenderMaterial(material, ALL_SIDES); }}See also
Section titled “See also”Functions
Section titled “Functions”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.