Skip to content
lsl.devlsl.devLSL Dev

LlIsLinkGLTFMaterial

Looking for the current API? Open the llIsLinkGLTFMaterial reference →

Return value notes

Returns an integer that is TRUE if the material is PBR and FALSE if it is Blinn-Phong diffuse texture on face

Caveats

  • Returns FALSE if link does not exist or refers to a multi-link target (such as LINK_SET).
  • Returns FALSE if face does not exist.

Examples

//Tells (on chat) if the materials are PBR
default
{
    state_entry()
    {
        integer link = LINK_THIS;
        integer i;
        for(; i < llGetLinkNumberOfSides(link); ++i)
        {
            string message = "Side " + (string)i + " material is ";
            if (llIsLinkGLTFMaterial(link, i))
                message += "glTF/PBR";
            else
                message += "Blinn-Phong";
            llSay(0, message);
        }

        if (llIsLinkGLTFMaterial(link, ALL_SIDES))
            llSay(0, "All sides are PBR.");
        else
            llSay(0, "Some sides are Blinn-Phong (not PBR).");
    }
}

See also: functions

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.