Difference between revisions of "PRIM TYPE SCULPT"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
{{#if:
{{#if:
{{LSL_Constants/PrimitiveParams}}
{{:PRIM_TYPE}}
}}{{LSL Constant
}}{{LSL Constant
|name=PRIM_TYPE_SCULPT
|name=PRIM_TYPE_SCULPT

Revision as of 18:38, 17 April 2008

Description

Constant: integer PRIM_TYPE_SCULPT = 7;

The integer constant PRIM_TYPE_SCULPT has the value 7

PRIM_TYPE_SCULPT is a parameter of PRIM_TYPE used to make prim into a sculpty and to change specific properties that define the shape and type of the scultpy.
Sculpted Prims: FAQ

[ PRIM_TYPE, PRIM_TYPE_SCULPT, string map, integer type ]

[ PRIM_TYPE, PRIM_TYPE_SCULPT, string map, integer type ]
• string map
• integer type

For use with llSetPrimitiveParams and llSetLinkPrimitiveParams

type Flags Style Description
PRIM_SCULPT_TYPE_SPHERE 1 Sphere Converge top & bottom, stitch left side to right
PRIM_SCULPT_TYPE_TORUS 2 Torus Stitch top to bottom, stitch left side to right
PRIM_SCULPT_TYPE_PLANE 3 Plane No stitching or converging
PRIM_SCULPT_TYPE_CYLINDER 4 Cylinder Stitch left side to right.
PRIM_SCULPT_TYPE_MESH 5 Mesh model See: Mesh
PRIM_SCULPT_FLAG_ZZZZZZZZ 63
PRIM_SCULPT_FLAG_ANIMESH 0x20 Animesh Read-only flag to query Animated mesh status.
PRIM_SCULPT_FLAG_INVERT 0x40 Invert Render inside out (inverts the normals).
PRIM_SCULPT_FLAG_MIRROR 0x80 Mirror Render an X axis mirror of the sculpty.

Related Articles

Constants

•  PRIM_TYPE
•  CHANGED_SHAPE

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Examples

<lsl>llSetPrimitiveParams([PRIM_TYPE,

                       PRIM_TYPE_SCULPT, 
                           "d962089b-2197-993c-9ec9-4993eb0a95f2",  // sculpty texture
                           PRIM_SCULPT_TYPE_SPHERE                  // type
                     ]);</lsl>

<lsl>//Rotates between the different sculpt types. default {

   touch_start(integer a)
   {
       list b = llGetPrimitiveParams([PRIM_TYPE]);
       integer type = llList2Integer(b,2) % 4;
       llSetObjectDesc(llList2String([ "Sphere",
                                       "Torus",
                                       "Plane",
                                       "Cylinder"], type));
       llSetPrimitiveParams(PRIM_TYPE + llList2List(b, 0, 1) + (type + 1));
   }

}</lsl>

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_TYPE_SCULPT = 7;