31 July 2019

20 August 2015

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

CommandRequired ParametersRequired Corrade PermissionsExample
setprimitivematerialgroup, password, item, materialinteract
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 ParametersPossible ValueDescription
rangeA number representing meters.The spherical radius from Corrade to search the primitive in.

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.

Notes