PRIM RENDER MATERIAL
Looking for the current API? Open the PRIM_RENDER_MATERIAL reference →
Wiki description
Used to get or set the material settings of a prim's
face.Usage
[ PRIM_RENDER_MATERIAL, integer face, string render_material ]
Used with llSetPrimitiveParams & llSetLinkPrimitiveParams.
Caveats
- If
render_materialis provided as NULL_KEY, the glTF Material is removed fromface, reverting back to any underlying Blinn-Phong materials.
Examples
llSetPrimitiveParams([ PRIM_RENDER_MATERIAL, ALL_SIDES, my_render_material ]);
llSetPrimitiveParams([ PRIM_RENDER_MATERIAL, ALL_SIDES, llGetInventoryName(INVENTORY_MATERIAL, 0) ]);
llSetPrimitiveParams([ PRIM_RENDER_MATERIAL, 0, my_render_material ]);llGetPrimitiveParams([ PRIM_RENDER_MATERIAL, integer face ]);
Returns the list [ string
render_materialCaveats
- With
render_materialas with llGetRenderMaterial, 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.
Target
In the case of llGetPrimitiveParams is either the prim the script resides in, or the prim specified by the immediately prior PRIM_LINK_TARGET call. However in the case of llGetLinkPrimitiveParams, it is either the value of the
link parameter, or the prim specified by the immediately prior PRIM_LINK_TARGET call.See also: constants
See also: functions
See also: events
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Template:LSL PrimitiveParam Categorize
Original shared helper source (conditional wiki logic is not evaluated)
{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{#ifexist:Template:LSLC{{#var:lang}}|
{{LSLC{{#var:lang}}|PrimitiveParams}}
{{LSLC{{#var:lang}}|PrimitiveParams/{{{1}}}}}
{{LSLC{{#var:lang}}|{{{1}}}}}
|
{{LSLC|PrimitiveParams{{#var:lang}}}}
{{LSLC|PrimitiveParams/{{{1}}}{{#var:lang}}}}
{{LSLC|{{{1}}}{{#var:lang}}}}
}}
}}}}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.