llSetRenderMaterial
void llSetRenderMaterial(string Material, integer Face)Applies Render Material to Face of prim.
Render Material may be a UUID or name of a material in prim inventory.
If Face is ALL_SIDES, set the render material on all faces.
Parameters
-
Material(string) -
Face(integer)
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); }}Caveats
Section titled “Caveats”- If
materialis provided asNULL_KEY, the glTF Material is removed from the face, reverting back to any underlying Blinn-Phong materials. - This function will clear most PRIM_GLTF_* properties on the face, with the exceptions of repeats, offsets, and rotation_in_radians.
See Also
Section titled “See Also”- llSetLinkRenderMaterial
- llGetRenderMaterial
- llSetPrimitiveParams
- llSetLinkPrimitiveParams
- PRIM_RENDER_MATERIAL