PRIM RENDER MATERIAL

From Second Life Wiki
Revision as of 14:44, 4 October 2022 by Cosmic Linden (talk | contribs) (Created page with "{{hint |mode=warning |title_desc=Future feature |desc=This function will be supported in the upcoming GLTF Materials project.</b><br/>Currently it will only work in support...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Emblem-important-red.png Warning! Future feature

This function will be supported in the upcoming GLTF Materials project.
Currently it will only work in supported testing areas with a supported test viewer.

Description

Constant: integer PRIM_RENDER_MATERIAL = 43;

The integer constant PRIM_RENDER_MATERIAL has the value 43

Used to get or set the material settings of a prim's face.

llSetPrimitiveParams

[ PRIM_RENDER_MATERIAL, integer face, string material ]
• integer face face number or ALL_SIDES
• string material a material in the inventory of the prim this script is in or a UUID of a material

Used with llSetPrimitiveParams & llSetLinkPrimitiveParams.

Caveats

  • repeats is not only used to set the number of repeats but the sign of the individual components is also used to set the "Flip" attribute.
  • If material is missing from the prim's inventory and it is not a UUID or it is not a material then an error is shouted on DEBUG_CHANNEL.
  • If material is a UUID then there are no new 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.


Examples

llSetPrimitiveParams([ PRIM_RENDER_MATERIAL, ALL_SIDES, my_material ]);
llSetPrimitiveParams([ PRIM_RENDER_MATERIAL, ALL_SIDES, llGetInventoryName(INVENTORY_MATERIAL, 0) ]);
llSetPrimitiveParams([ PRIM_RENDER_MATERIAL, 0, my_material ]);

Caveats


Related Articles

Deep Notes

All Issues

~ Search JIRA for related Issues
   CHANGED_TEXTURE is not triggered when texture is changed via script

Signature

integer PRIM_RENDER_MATERIAL = 43;