Difference between revisions of "LlGetTexture"
Jump to navigation
Jump to search
m |
m (Added caveat regarding a renamed texture) |
||
Line 7: | Line 7: | ||
|spec | |spec | ||
|caveats=*{{LSL Constant/NULL KEY}} is returned when the {{LSLGC|Owner|owner}} does not have {{LSLGC|Permissions/Asset|full permissions}} to the object and the texture is not in the prim's inventory. | |caveats=*{{LSL Constant/NULL KEY}} is returned when the {{LSLGC|Owner|owner}} does not have {{LSLGC|Permissions/Asset|full permissions}} to the object and the texture is not in the prim's inventory. | ||
*If the texture was renamed in the prim's inventory the new name will not be recognized and the UUID will be returned instead | |||
*The white texture from the texture picker is "[[TEXTURE_BLANK|5748decc-f629-461c-9a36-a35a221fe21f]]" | *The white texture from the texture picker is "[[TEXTURE_BLANK|5748decc-f629-461c-9a36-a35a221fe21f]]" | ||
*The default texture (plywood) is "[[TEXTURE_PLYWOOD|89556747-24cb-43ed-920b-47caed15465f]]" | *The default texture (plywood) is "[[TEXTURE_PLYWOOD|89556747-24cb-43ed-920b-47caed15465f]]" |
Revision as of 10:29, 21 June 2014
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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 returns the value for face zero. 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
- If face indicates a face that does not exist the return is NULL_KEY
- 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.
- If the texture was renamed in the prim's inventory the new name will not be recognized and the UUID will be returned instead
- 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
• | PrimitiveParams | – | PRIM_TEXTURE | |
• | llSetTexture | |||
• | llSetLinkTexture | – | Sets link's texture | |
• | llGetNumberOfSides | – | Gets the number of faces on the prim |