31 July 2019
selection optional parameter.20 August 2015
index to face and added the all and default parameters.18 August 2015
Corrade can set primitive sculpt data using the setprimitivetexturedata command.
| Command | Required Parameters | Required Corrade Permissions | Example |
|---|---|---|---|
setprimitivetexturedata | group, password, item | interact | |
The data parameter follows the TextureEntry structure and sub-structures.
| Optional Parameter | Possible Value | Description |
|---|---|---|
range | A range in meters. | The spherical distance from Corrade in which to locate the item. |
face | The face number. | The face number to set the texture on. |
all | Set the specified texture data for all faces. | |
default | Set the specified texture data for the default texture. |
The command can be used to set the color of primitives. For instance, the following invocation will set the color of the 4th face of a primitive to red:
llInstantMessage(CORRADE, wasKeyValueEncode(
[
// set the color for the 4th face
// on a primitive in a 4m range
// specified by UUID to red
"command", "setprimitivetexturedata",
"group", wasURLEscape(GROUP),
"password", wasURLEscape(PASSWORD),
// the UUID of the primitive
"item", "e8c6c1c7-7f08-469e-f084-f0019aa33624",
"range", 4,
// the 4th face
"face", "4",
// just set the texture to a texture UUID
"data", wasURLEscape(
wasListToCSV(
[
"RGBA", "<1, 0, 0, 1>"
]
)
),
"callback", wasURLEscape(URL)
]
)
);
In case you want to set the color for all the faces, the whole primitive, then instead of specifying 4 for the face parameter, specify all.