Difference between revisions of "LlGetTexture"

From Second Life Wiki
Jump to navigation Jump to search
Line 37: Line 37:
|history=
|history=
*On 5/15/2005 (give or take a day) llGetTexture was changed to check the host object's permissions and if inadequate return {{LSL Constant/NULL_KEY}}.
*On 5/15/2005 (give or take a day) llGetTexture was changed to check the host object's permissions and if inadequate return {{LSL Constant/NULL_KEY}}.
**http://forums.secondlife.com/showthread.php?t=47066
**http://forums-archive.secondlife.com/54/a1/47066/1.html
**http://forums.secondlife.com/showthread.php?t=33388
**http://forums-archive.secondlife.com/54/09/33388/1.html
|cat1
|cat1
|cat2=Texture
|cat2=Texture

Revision as of 03:27, 9 April 2010

Summary

Function: string llGetTexture( integer face );
0.0 Forced Delay
10.0 Energy

Returns a string that is the texture on face

• integer face face number or ALL_SIDES

If face is ALL_SIDES then the function works on all sides. If the texture is in the prim's inventory, the return value is the inventory name, otherwise the returned value is the texture UUID.

Caveats

  • The function silently fails if its face value indicates a face that does not exist.
  • If the host object does not have full permissions and the texture is not in the prim's inventory, the returned value is NULL_KEY.
  • The white texture from the texture picker is "5748decc-f629-461c-9a36-a35a221fe21f"
  • The default texture (plywood) is "89556747-24cb-43ed-920b-47caed15465f"

Examples

<lsl> //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;
       }
   }

}

</lsl>

See Also

Functions

•  llSetTexture
•  llSetLinkTexture Sets link's texture
•  llGetNumberOfSides Gets the number of faces on the prim

Deep Notes

History

Signature

function string llGetTexture( integer face );