Set Primitive Material

31 July 2019

  • C10 - added the selection optional parameter.

20 August 2015

  • Release 8.44 - added.
setprimitivematerial (Commands)
TypeCorrade progressive command
Commandsetprimitivematerial
DescriptionThe setprimitivematerial command can be used to set the material for a primitive.
Permissionsinteract
Parametersgroup, password, item, material
Last ChangesRelease 8.44 - added.

The setprimitivematerial command can be used to set the material for a primitive.

Command Required Parameters Required Corrade Permissions Example
setprimitivematerial group, password, item, material interact
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // set the material of a primitive
            // in 3 meters range named "Rock"
            // to the "Stone" material type
            "command", "setprimitivematerial",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "item", "Rock",
            "range", 3,
            "material", "Stone",
            "callback", wasURLEscape(URL)
        ]
    )
);
Optional Parameters Possible Value Description
range A number representing meters. The spherical radius from Corrade to search the primitive in.
selection attached, rezzed or all (default: all) Either attached, rezzed or all for selecting only primitives or objects attached to avatars, primitives or objects rezzed in-world or all primitives or objects respectively.

The command takes as parameter in material a member of the Material enumeration. In order to retrieve the material instead, you can use the getprimitiveshapedata command or even the getprimitivedata by setting data to Material.


secondlife/scripted_agents/corrade/api/commands/setprimitivematerial.txt ยท Last modified: 2020/09/04 06:53 (external edit)

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy, copyright and the plagiarism pages.