PRIM_TYPE_SCULPT
constant
ConstantSet with Get with
integer PRIM_TYPE_SCULPT = 7;llSetLinkPrimitiveParamsFastPRIM_TYPE, PRIM_TYPE_SCULPT, string map, integer typellGetLinkPrimitiveParams, llGetPrimitiveParamsPRIM_TYPE → PRIM_TYPE_SCULPT, string map, integer typestring mapinteger type// Values: PrimTypeSculpt
Other PrimType values (7)
PRIM_TYPE_SCULPT is a parameter of PRIM_TYPE used to make a prim into a sculpty of specific shape and type.
PRIM_TYPE, PRIM_TYPE_SCULPT, string map, integer type- string map
- integer type — PRIM_SCULPT_TYPE_* flag with optional additional PRIM_SCULPT_FLAG_* flags OR’ed on
For use with llSetPrimitiveParams and llSetLinkPrimitiveParams
integer PRIM_SCULPT_TYPE_SPHERE = 1; // Sculpt type option for PRIM_TYPE_SCULPT that stitches the left side to the right and separately converges the top and bottom to produce a sphere-shaped sculpted priminteger PRIM_SCULPT_TYPE_TORUS = 2; // Sculpt type option for PRIM_TYPE_SCULPT that stitches top-to-bottom and left-to-right to produce a torus-shaped sculpted priminteger PRIM_SCULPT_TYPE_PLANE = 3; // Sculpt type option for PRIM_TYPE_SCULPT that performs no stitching or converging, producing a flat plane-shaped sculpted priminteger PRIM_SCULPT_TYPE_CYLINDER = 4; // Sculpt type option for PRIM_TYPE_SCULPT that stitches the left side to the right to produce a cylinder-shaped sculpted priminteger PRIM_SCULPT_TYPE_MESH = 5; // Sculpt type option for PRIM_TYPE_SCULPT indicating the object is a uploaded Mesh modelinteger PRIM_SCULPT_TYPE_MASK = 7; // Bitmask used when parsing sculpted prim properties (PRIM_TYPE_SCULPT) from llGetPrimitiveParams to separate the base sculpt type from modifying flags (invert or mirror)
integer PRIM_SCULPT_FLAG_ANIMESH = 0x0020; // Read-only flag for PRIM_TYPE_SCULPT to query whether the object is an Animated Mesh (Animesh)integer PRIM_SCULPT_FLAG_INVERT = 0x0040; // Flag for PRIM_TYPE_SCULPT to render the sculpted prim inside-out by inverting the normals of each polygoninteger PRIM_SCULPT_FLAG_MIRROR = 0x0080; // Flag for PRIM_TYPE_SCULPT to render a mirror-image of the sculpted prim, mirrored across the X-axis
| type Flags | Style | Description | |||
|---|---|---|---|---|---|
| Sphere | Converge top & bottom, stitch left side to right | ||||
| Torus | Stitch top to bottom, stitch left side to right | ||||
| Plane | No stitching or converging | ||||
| Cylinder | Stitch left side to right. | ||||
| Mesh model | See: Mesh | ||||
| Animesh | Read-only flag to query Animated mesh status. | ||||
| Invert | Render inside out (inverts the normals). | ||||
| Mirror | Render an X axis mirror of the sculpty. | ||||
PRIM_SCULPT_TYPE_MASK can be used to filter out the PRIM_SCULPT_FLAG_* flags from the type to determine the PRIM_SCULPT_TYPE_* flag. The main application of this would be when using llGetPrimitiveParams.
Caveats
Section titled “Caveats”- The value of map is
NULL_KEYwhen the owner does not have full permissions to the object and the map asset is not in the prim’s inventory. - While it is possible to use this to animate an object, it is not recommended. For details see: Why UUID Flipping is Bad
Examples
Section titled “Examples”Example 1
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TYPE, PRIM_TYPE_SCULPT, "d962089b-2197-993c-9ec9-4993eb0a95f2", // sculpty texture PRIM_SCULPT_TYPE_SPHERE // type | PRIM_SCULPT_FLAG_MIRROR // use pipe | to add each flag ]);Example 2
//Rotates between the different sculpt types.default{ touch_start(integer a) { list b = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TYPE]); integer type = llList2Integer(b,2) % 4; llSetObjectDesc(llList2String([ "Sphere", "Torus", "Plane", "Cylinder"], type)); llSetLinkPrimitiveParamsFast(LINK_THIS, PRIM_TYPE + llList2List(b, 0, 1) + (type + 1)); }}Example 3
//A simple script to setup a prim as a sculpty.default{ state_entry() { llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, "your Sculpt map name in the object", PRIM_SCULPT_TYPE_SPHERE , PRIM_TEXTURE, ALL_SIDES, "your texture name in the object", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 //comment out if not needed.// , PRIM_SIZE, <0.63,0.199,0.52> // If you need to change the scale (size) of the object, uncomment this line. ]); } // The gray color you see on your sculpt object is the SL no found texture that is gray.}History
Section titled “History”- SVN:1053 r94734 Branch:trunk Tuesday, 19 August 2008 - PRIM_SCULPT_FLAG_* syntax merged into the Trunk. Support for syntax slated for Client 1.21.0
- SVN:758 r91966 Branch:featurettes-5 Thursday, 10 July 2008 - Introduction of PRIM_SCULPT_FLAG_* extended syntax.
See also
Section titled “See also”Constants
Section titled “Constants”Functions
Section titled “Functions”Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.