Difference between revisions of "CHANGED RENDER MATERIAL"

From Second Life Wiki
Jump to navigation Jump to search
(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...")
 
(Pre-emptively update CHANGED RENDER MATERIAL description in advance of future behavior where the event also fired when overrides change)
Line 8: Line 8:
|type=integer
|type=integer
|value={{LSL Hex|0x1000}}
|value={{LSL Hex|0x1000}}
|desc=Prim material ID has changed on one or more faces.  
|desc=Prim material ID or material overrides have changed on one or more faces.  


|examples=
|examples=
Line 18: Line 18:
         if (change & CHANGED_RENDER_MATERIAL) //note that it's & and not &&... it's bitwise!
         if (change & CHANGED_RENDER_MATERIAL) //note that it's & and not &&... it's bitwise!
         {
         {
             llOwnerSay("The prim's material ID has changed on one or more faces.");
             llOwnerSay("The prim's material ID and/or overrides have changed on one or more faces.");
         }
         }
     }
     }

Revision as of 15:59, 8 December 2022

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 CHANGED_RENDER_MATERIAL = 0x1000;

The integer constant CHANGED_RENDER_MATERIAL has the value 0x1000

Prim material ID or material overrides have changed on one or more faces.

Examples

default
{
    changed(integer change)
    {
        if (change & CHANGED_RENDER_MATERIAL) //note that it's & and not &&... it's bitwise!
        {
            llOwnerSay("The prim's material ID and/or overrides have changed on one or more faces.");
        }
    }
}

Deep Notes

Search JIRA for related Issues

Signature

integer CHANGED_RENDER_MATERIAL = 0x1000;