LlGetTexture
Looking for the current API? Open the llGetTexture reference →
Function notes
If the texture is in the prim's inventory, the return value is the inventory name, otherwise the returned value is the texture UUID.
Return value notes
Returns a string that is the Blinn-Phong diffuse texture on face
Caveats
- 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.
- The white texture from the texture picker is "5748decc-f629-461c-9a36-a35a221fe21f"
- The default texture (plywood) is "89556747-24cb-43ed-920b-47caed15465f"
Examples
//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;
}
}
}See also: functions
History
- 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.
- http://forums-archive.secondlife.com/54/a1/47066/1.html
- http://forums-archive.secondlife.com/54/09/33388/1.html
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:
{{#vardefine:header|{{#var:header}}{{#if:{{{nc|}}}{{#pos:{{#var:moded}}|r}}||{{#switch:{{NAMESPACE}}|Template=|User=|[[Category:LSL Face{{#var:lang}}]][[Category:LSL Face{{#var:lang}}/{{#if:{{{return|}}}{{{returns|}}}|Get|Set}}]]}}}}}}
{{#vardefine:ALL_SIDES|{{LSL Const|ALL_SIDES|integer|-1|hex=0xFFFFFFFF}}}}
{{#vardefine:p_{{{1|none}}}_desc|{{LSLGC|Face{{#var:lang}}|face}} number{{#ifeq:{{{notall|}}}|*||<nowiki> </nowiki>or {{#var:ALL_SIDES}}}}}}
{{#vardefine:p_{{{1|none}}}_hover|face number{{#ifeq:{{{notall|}}}|*||<nowiki> </nowiki>or ALL_SIDES (-1)}}}}
{{#ifeq:{{{notall|}}}|*||{{#vardefine:facechoise|If {{LSLP|{{{1|none}}}}} is {{#var:ALL_SIDES}} then the {{#if:{{{2|}}}|{{{2|}}}|function}} {{#if:{{{get|}}}|{{{get|}}}|{{#if:{{{ALL_SIDES|}}}|{{{ALL_SIDES|}}}|works on all sides.}}}}}}}}
{{#vardefine:header_footnote|{{#var:header_footnote}}{{#if:{{{!footer|}}}||{{PBR}}
{{#var:facechoise}}{{PBR}}}}}}
{{#vardefine:caveats|{{#var:caveats}}{{#if:{{{!footer|}}}|
*{{#var:facechoise}}|}}{{#if:{{{return|}}}{{{returns|}}}|
*If {{LSLP|{{{1|none}}}}} indicates a face that does not exist the {{#if:{{{2|}}}|{{{2|}}}}} {{#if:{{{return|}}}|return is {{{return|}}}| returns {{{returns|}}}}}|
*The {{#if:{{{2|}}}|{{{2|}}}|function}} silently fails if its {{LSLP|{{{1|none}}}}} value indicates a face that does not exist.}}}}
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|ALL_SIDES}}
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none}}}_hover}}
|-
{{VarPair|facechoise}}
|-
{{VarPair|header_footnote}}
|-
{{VarPair|caveats}}
|}
</noinclude>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.