Difference between revisions of "LlGetTexture"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
(Add Blinn-Phong terminology to page following PBR release.)
 
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
|return_text=that is the texture on '''face'''
|return_text=that is the [[PBR_Materials#Nomenclature_changes|Blinn-Phong]] diffuse texture on '''face'''
|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]].
|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

Latest revision as of 06:14, 30 November 2023

Summary

Function: string llGetTexture( integer face );

Returns a string that is the Blinn-Phong diffuse 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 );