Difference between revisions of "LlGetTexture"

From Second Life Wiki
Jump to navigation Jump to search
(I don't think "or" is correct. If it were then this function would only return inventory names and never uuids.)
m (<lsl> tag to <source>)
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|inject-2={{LSL Function/face|face|ALL_SIDES=returns the value for face zero.}}
|inject-2={{LSL Function/face|face|ALL_SIDES=returns the value for face zero.|return=[[NULL_KEY]]}}
|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
Line 10: Line 10:
*The default texture (plywood) is "[[TEXTURE_PLYWOOD|89556747-24cb-43ed-920b-47caed15465f]]"
*The default texture (plywood) is "[[TEXTURE_PLYWOOD|89556747-24cb-43ed-920b-47caed15465f]]"
|constants
|constants
|examples=<lsl>
|examples=<source lang="lsl2">
//Tells (on chat) the texture keys / texture names on 6 sides
//Tells (on chat) the texture keys / texture names on 6 sides
default
default
Line 25: Line 25:
     }
     }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||{{LSLGC|PrimitiveParams}}|[[PRIM_TEXTURE]]}}
|also_functions={{LSL DefineRow||{{LSLGC|PrimitiveParams}}|[[PRIM_TEXTURE]]}}

Revision as of 03:00, 22 January 2015

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 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

All Issues ~ Search JIRA for related Bugs

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

•  PrimitiveParams PRIM_TEXTURE
•  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 );