Difference between revisions of "LlGetTexture"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 3: Line 3:
|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|p1_type=integer|p1_name=face
|func=llGetTexture|return_type=string|p1_type=integer|p1_name=face
|func_footnote=If the object is no-mod and the texture is not in the inventory, return a {{LSL Const|NULL_KEY|key|&quot;00000000-0000-0000-0000-000000000000&quot;|c=Evaluates to false in conditionals just like invalid keys.}}.<br/>If it is a texture in the object's inventory, return the inventory name, otherwise return the texture [[UUID]].
|func_desc
|return_text=that is the texture on '''face'''
|return_text=that is the texture on '''face'''
|func_footnote=If the object is no-mod and the texture is not in the inventory, the returned value is {{LSL Constant/NULL KEY}}.<br/>If it is a texture in the object's inventory, return the inventory name, otherwise return the texture [[UUID]].
|spec
|spec
|caveats
|caveats
Line 33: Line 32:
|also_articles
|also_articles
|notes
|notes
|sort=GetTexture
|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}}.
**http://forums.secondlife.com/showthread.php?t=47066
**http://forums.secondlife.com/showthread.php?t=33388
|cat1
|cat1
|cat2=Texture
|cat2=Texture

Revision as of 16:59, 6 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 object is no-mod and the texture is not in the inventory, the returned value is NULL_KEY.
If it is a texture in the object's inventory, return the inventory name, otherwise return the texture UUID.

Caveats

  • The function silently fails if its face value indicates a face that does not exist.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> //Tells the owner the textures 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 );