LlSetRenderMaterial
Looking for the current API? Open the llSetRenderMaterial reference →
Wiki description
Sets the
material of this prim's face. This function will clear most PRIM_GLTF_* properties on the face, with the exceptions of repeats, offsets, and rotation_in_radians.Caveats
- If
materialis provided as NULL_KEY, the glTF Material is removed fromface, reverting back to any underlying Blinn-Phong materials.
Examples
default
{
state_entry()
{
// the first material alphabetically inside the same prim's inventory
string material = llGetInventoryName(INVENTORY_MATERIAL, 0);
// set it on all sides of the prim containing the script
llSetRenderMaterial(material, ALL_SIDES);
}
}See also: functions
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.
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:
{{#vardefine:header|{{#var:header}}{{#if:{{{nc|}}}{{#pos:{{#var:moded}}|r}}||{{#switch:{{NAMESPACE}}|Template=|User=|[[Category:LSL Face{{#var:lang}}]][[Category:LSL Face{{#var:lang}}/{{#if:{{{return|}}}{{{returns|}}}|Get|Set}}]]}}}}}}
{{#vardefine:ALL_SIDES|{{LSL Const|ALL_SIDES|integer|-1|hex=0xFFFFFFFF}}}}
{{#vardefine:p_{{{1|none}}}_desc|{{LSLGC|Face{{#var:lang}}|face}} number{{#ifeq:{{{notall|}}}|*||<nowiki> </nowiki>or {{#var:ALL_SIDES}}}}}}
{{#vardefine:p_{{{1|none}}}_hover|face number{{#ifeq:{{{notall|}}}|*||<nowiki> </nowiki>or ALL_SIDES (-1)}}}}
{{#ifeq:{{{notall|}}}|*||{{#vardefine:facechoise|If {{LSLP|{{{1|none}}}}} is {{#var:ALL_SIDES}} then the {{#if:{{{2|}}}|{{{2|}}}|function}} {{#if:{{{get|}}}|{{{get|}}}|{{#if:{{{ALL_SIDES|}}}|{{{ALL_SIDES|}}}|works on all sides.}}}}}}}}
{{#vardefine:header_footnote|{{#var:header_footnote}}{{#if:{{{!footer|}}}||{{PBR}}
{{#var:facechoise}}{{PBR}}}}}}
{{#vardefine:caveats|{{#var:caveats}}{{#if:{{{!footer|}}}|
*{{#var:facechoise}}|}}{{#if:{{{return|}}}{{{returns|}}}|
*If {{LSLP|{{{1|none}}}}} indicates a face that does not exist the {{#if:{{{2|}}}|{{{2|}}}}} {{#if:{{{return|}}}|return is {{{return|}}}| returns {{{returns|}}}}}|
*The {{#if:{{{2|}}}|{{{2|}}}|function}} silently fails if its {{LSLP|{{{1|none}}}}} value indicates a face that does not exist.}}}}
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|ALL_SIDES}}
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none}}}_hover}}
|-
{{VarPair|facechoise}}
|-
{{VarPair|header_footnote}}
|-
{{VarPair|caveats}}
|}
</noinclude>Template:LSL Function/inventory
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}<includeonly>{{#if:
{{:DEBUG_CHANNEL}}
{{#vardefine:p_{{{1|none}}}_desc|{{AAn|{{#if:{{{insert|}}}|{{{insert}}}|{{#if:{{{type|}}}|{{{type}}}|item}}}}}} in the {{LSLGC|Inventory|inventory}} {{#if:{{{remote|}}}|of the {{#if:{{{target|}}}|[[{{{target|}}}|target]]|target}} prim|of the prim this script is in}}{{#ifeq:{{{uuid|}}}{{{UUID|}}}|true|{{#if:{{{empty|}}}|,| or}} a {{HoverLink|UUID|Universally Unique IDentifier}}{{#if:{{{type|}}}| of {{AAn|{{{type}}}}}}}}}{{#if:{{{empty|}}}| or an empty string{{#ifeq:{{{empty}}}|*|| {{{empty}}}}}}}{{#var:p_{{{1|none}}}_desc}}}}
{{#vardefine:p_{{{1|none}}}_hover|{{AAn|{{#if:{{{insert|}}}|{{{insert}}}|{{#if:{{{type|}}}|{{{type}}}|item}}}}}} in the inventory {{#if:{{{remote|}}}|of the target prim|of the prim this script is in}}{{#ifeq:{{{uuid|}}}{{{UUID|}}}|true|{{#if:{{{empty|}}}|,| or}} a UUID{{#if:{{{type|}}}| of {{AAn|{{{type}}}|{{{type_hover|{{{type}}}}}}}}}}}}{{#if:{{{empty|}}}| or an empty string{{#ifeq:{{{empty}}}|*|| {{{empty_hover|{{{empty}}}}}}}}}}{{#var:p_{{{1|none}}}_hover}}}}
{{#vardefine:caveats{{#var:direction}}|{{#if:{{#if:{{{no_caveat|}}}||{{{1|}}}}}|{{#var:caveats{{#var:direction}}}}
{{#if:{{{empty|}}}|* If {{LSLP|{{{1}}}}} is not an empty string and...
**{{LSLP|{{{1}}}}} is missing from the prim's inventory {{#if:{{{full|}}}|or not {{HoverLink|:Category:LSL_Permissions/Asset|copy, mod and transfer|full permissions}}}} {{#ifeq:{{{uuid|}}}{{{UUID|}}}|true|and it is not a {{HoverLink|UUID|Universally Unique IDentifier}}}} {{#if:{{{type|}}}|or it is not {{AAn|{{{type|item}}}}}}} then {{#if:{{{silent|}}}|it fails silently|an error is shouted on {{#var:DEBUG_CHANNEL}}}}.
|* If {{LSLP|{{{1}}}}} is missing from the prim's inventory {{#if:{{{full|}}}|or not {{HoverLink|:Category:LSL_Permissions/Asset|copy, mod and transfer|full permissions}}}} {{#ifeq:{{{uuid|}}}{{{UUID|}}}|true|and it is not a {{HoverLink|UUID|Universally Unique IDentifier}}}} {{#if:{{{type|}}}|or it is not {{AAn|{{{type|item}}}}}}} then {{#if:{{{silent|}}}|it fails silently|an error is shouted on {{#var:DEBUG_CHANNEL}}}}. }}{{#ifeq:{{{uuid|}}}{{{UUID|}}}|true|
* If {{LSLP|{{{1}}}}} is a {{HoverLink|UUID|Universally Unique IDentifier}} then there are no new [[:Category:LSL_Permissions/Asset|asset permissions]] consequences for the object.
** The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.}}|{{#var:caveats{{#var:direction}}}}}}}}
{{{{#if:{{{volume|}}}|LSL Function/volume}}|{{{volume|}}}|}}
}}</includeonly><noinclude>
{{Multi-lang}}
{{UpdateLink}}
{| {{Prettytable}} {{#vardefine:caveats}}{{#vardefine:p_ta_desc}}{{#vardefine:p_ta_hover}}
|+<code><nowiki>{{{{FULLPAGENAMEE}}|ta|type=sound|uuid=true}}</nowiki></code>{{{{FULLPAGENAMEE}}|ta|type=sound|uuid=true}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|caveats}}
|-
{{VarPair|p_ta_desc}}
|-
{{VarPair|p_ta_hover}}
|}
{| {{Prettytable}} {{#vardefine:caveats}}{{#vardefine:p_ta_desc}}{{#vardefine:p_ta_hover}}
|+<code><nowiki>{{{{FULLPAGENAMEE}}|ta|type=sound|uuid=false}}</nowiki></code>{{{{FULLPAGENAMEE}}|ta|type=sound|uuid=false}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|caveats}}
|-
{{VarPair|p_ta_desc}}
|-
{{VarPair|p_ta_hover}}
|}
{| {{Prettytable}} {{#vardefine:caveats}}{{#vardefine:p_ta_desc}}{{#vardefine:p_ta_hover}}
|+<code><nowiki>{{{{FULLPAGENAMEE}}|ta|type=landmark|uuid=true|empty=(for teleporting within the same region)}}</nowiki></code>{{{{FULLPAGENAMEE}}|ta|type=landmark|uuid=true|empty=(for teleporting within the same region)}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|caveats}}
|-
{{VarPair|p_ta_desc}}
|-
{{VarPair|p_ta_hover}}
|}
</noinclude>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.