llIsLinkGLTFMaterial
function
Function syntax
integer llIsLinkGLTFMaterial(integer link,// Link number (or LINK_* flag) of the prim to inspect. Values: Linkinteger face// Face number (orALL_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
integer result = llIsLinkGLTFMaterial(0, 0);Caveats
Section titled “Caveats”- Returns
FALSEif link does not exist or refers to a multi-link target (such asLINK_SET). - Returns
FALSEif face does not exist.
Examples
Section titled “Examples”Example 1
8 collapsed lines
//Tells (on chat) if the materials are PBRdefault{ 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
Section titled “See also”Functions
Section titled “Functions”llGetNumberOfSides— Gets the number of faces on the prim
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.