Difference between revisions of "LlGetTexture"

From Second Life Wiki
Jump to navigation Jump to search
m (finaly)
(it always returns a string, even if it represent a key. That caveat you added doesn't make sense, there is no way to determine if a texture is no full rights if it isn't in inventory)
Line 2: Line 2:
{{LSL_Function
{{LSL_Function
|func_id=57|func_sleep=0.0|func_energy=10.0
|func_id=57|func_sleep=0.0|func_energy=10.0
|func=llGetTexture|return_type=string_or_key|p1_type=integer|p1_name=face
|func=llGetTexture|return_type=string|p1_type=integer|p1_name=face
|return_text=that is the texture on '''face'''
|return_text=that is the texture on '''face'''
|func_footnote=If the texture is in the prim's inventory, the return value is the inventory name, otherwise the return value is the texture [[UUID]] witch is a key.
|func_footnote=If the texture is in the prim's inventory, the return value is the inventory name, otherwise the returned value is the texture [[UUID]].
|spec
|spec
|caveats=*If the host object is no-mod and the texture is not in the prim's inventory, the returned value is {{LSL Constant/NULL KEY}}.
|caveats=*If the host object is no-mod and the texture is not in the prim's inventory, the returned value is {{LSL Constant/NULL KEY}}.
*If the host object is mod and the texture is not "full rights" and not in the prim's inventory, the returned value is {{LSL Constant/NULL KEY}}.
*The white texture from the texture picker is "5748decc-f629-461c-9a36-a35a221fe21f"
*The BLANK texture from the color picker is 5748decc-f629-461c-9a36-a35a221fe21f
*The default texture (plywood) is "89556747-24cb-43ed-920b-47caed15465f"
*The DEFAULT texture (looks like wood) is 89556747-24cb-43ed-920b-47caed15465f


|constants
|constants

Revision as of 01:09, 20 April 2008

Summary

Function: string llGetTexture( integer face );

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 is no-mod 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"
All Issues ~ Search JIRA for related Bugs

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

Search JIRA for related Issues

Signature

function string llGetTexture( integer face );