Skip to content
lsl.devlsl.devLSL Dev

llGetRenderMaterial

function
Function syntax
string llGetRenderMaterial(
  1. integer face// Face number or ALL_SIDES. Values: Faces
);
Returns
string
Energy
10

If the Material is in the prim’s inventory, the return value is the inventory name, otherwise the returned value is the Material UUID.

Returns a string that is the Material on face

How to use
string result = llGetRenderMaterial(0);

NULL_KEY

is returned when the owner does not have full permissions to the object and the Material is not in the prim’s inventory.

Example 1
//Tells (on chat) the Material keys / Material names on 6 sides
default
{
state_entry()
{
integer i = 0;
integer max = llGetNumberOfSides();
while(i < max)
{
llSay(0,"Side " + (string)i + " Material is: " + (string)llGetRenderMaterial(i));
++i;
}
}
}
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.