Skip to content
lsl.devlsl.devLSL Dev

llGetTexture

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

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

Returns a string that is the Blinn-Phong diffuse texture on face

How to use
string result = llGetTexture(0);

NULL_KEY

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

Example 1
//Tells (on chat) the texture keys / texture names on 6 sides
default
{
state_entry()
{
integer i = 0;
integer max = llGetNumberOfSides();
while(i < max)
{
llSay(0,"Side " + (string)i + " texture is: " + (string)llGetTexture(i));
++i;
}
}
}
  • On 5/15/2005 (give or take a day) llGetTexture was changed to check the host object’s permissions and if inadequate return

NULL_KEY

.

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.