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 | llInstantMessage(CORRADE, wasKeyValueEncode( [ // set the texture for the 4th face // on a primitive in a 4m range // specified by UUID "command", "setprimitivetexturedata", "group", llEscapeURL(GROUP), "password", llEscapeURL(PASSWORD), // the UUID of the primitive "item", "4bc141fd-1dcf-62bb-993a-75c8498cd66d", "range", 4, // the 4th face "face", 4, // just set the texture to a texture UUID "data", wasURLEscape( wasListToCSV( [ "TextureID", "2b21acae-7aa5-ae18-3635-26d2a0924801" ] ) ), "callback", wasURLEscape(URL) ] ) ); |
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.
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.