Difference between revisions of "LlGetRenderMaterial"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{hint |mode=warning |title_desc=Future feature |desc=This function will be supported in the upcoming GLTF Materials project.</b><br/>Currently it will only work in support...")
 
(Add to glTF category.)
Line 4: Line 4:
  |desc=This function will be supported in the upcoming GLTF Materials project.</b><br/>Currently it will only work in supported testing areas with a supported test viewer.
  |desc=This function will be supported in the upcoming GLTF Materials project.</b><br/>Currently it will only work in supported testing areas with a supported test viewer.
  }}
  }}
[[Category:glTF]]
{{LSL_Function
{{LSL_Function
|inject-2={{LSL Function/face|face|ALL_SIDES=returns the value for face zero.|return=[[NULL_KEY]]}}
|inject-2={{LSL Function/face|face|ALL_SIDES=returns the value for face zero.|return=[[NULL_KEY]]}}

Revision as of 07:23, 25 August 2023

Emblem-important-red.png Warning! Future feature

This function will be supported in the upcoming GLTF Materials project.
Currently it will only work in supported testing areas with a supported test viewer.

Summary

Function: string llGetRenderMaterial( integer face );
0.0 Forced Delay
10.0 Energy

Returns a string that is the Material 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 Material is in the prim's inventory, the return value is the inventory name, otherwise the returned value is the Material 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 Material is not in the prim's inventory.

Examples

//Tells (on chat) the Material keys / Material names on 6 sides
default
{
    state_entry()
    {
        integer i = 0;
        integer max = llGetNumberOfSides();
        while(i < max)
        {
            llSay(0,"Side " + (string)i + " Material is: " + (string)llGetRenderMaterial(i));
            ++i;
        }
    }
}

See Also

Functions

•  PrimitiveParams PRIM_RENDER_MATERIAL
•  llSetRenderMaterial
•  llSetLinkRenderMaterial Sets link's Material
•  llGetNumberOfSides Gets the number of faces on the prim

Deep Notes

Signature

function string llGetRenderMaterial( integer face );