PRIM RENDER MATERIAL

From Second Life Wiki
Revision as of 14:12, 4 October 2022 by Cosmic Linden (talk | contribs)
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.

llGetPrimitiveParams

[ 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

• 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.
All Issues ~ Search JIRA for related Bugs

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 ]);

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;