Skip to content
lsl.devlsl.devLSL Dev

llIsLinkGLTFMaterial

function
Function syntax
integer llIsLinkGLTFMaterial(
  1. integer link,// Link number (or LINK_* flag) of the prim to inspect. Values: Link
  2. integer face// Face number (or ALL_SIDES) of the prim to inspect. Values: Faces
);
Returns
integer
Energy
10

Checks the specified face on the linked prim link. Returns TRUE if the face material is a PBR render material, or FALSE if it uses Blinn-Phong diffuse textures.

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

How to use
integer result = llIsLinkGLTFMaterial(0, 0);
  • 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.
Example 1
8 collapsed lines
//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).");
}
}
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.