Difference between revisions of "PRIM TYPE"

From Second Life Wiki
Jump to navigation Jump to search
m (Corrected a mistake in the related functions)
(try to make the fancy inclusion thing work)
Line 29: Line 29:


{{#vardefine:type_const|{{LSL Const|PRIM_TYPE|integer|9|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the the type of prim.}}}}
{{#vardefine:type_const|{{LSL Const|PRIM_TYPE|integer|9|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the the type of prim.}}}}
{{#vardefine:caveats-set|{{#var:caveats-set}}
* [[PRIM_TYPE]] can only be used with [[LINK_SET]] if the object contains 10 or fewer prims. It can only be used with [[LINK_ALL_OTHERS]] if the object contains 11 or fewer prims. If there are more prims, the operation will fail and an error will be shouted to [[DEBUG_CHANNEL]]. Work around this by looping through the prims with [[llSetLinkPrimitiveParamsFast]].
}}
{{#switch:{{{1|}}}
|get={{#vardefine:caveats|{{#var:caveats}}
{{#var:caveats-get}}}}
|set={{#vardefine:caveats|{{#var:caveats}}
{{#var:caveats-set}}}}
}}


}}</onlyinclude>{{#if:
}}</onlyinclude>{{#if:
Line 44: Line 56:


The values needed for '''{{LSL Param|type_parameters|flag_parameters}}''' is dependent on '''{{LSL Param|type_flag|flag}}''', please refer to the individual PRIM_TYPE_* articles for additional information.
The values needed for '''{{LSL Param|type_parameters|flag_parameters}}''' is dependent on '''{{LSL Param|type_flag|flag}}''', please refer to the individual PRIM_TYPE_* articles for additional information.
{{LSL Generic/Caveats|caveats={{#var:caveats-set}}|title=*}}
|toc=llSetPrimitiveParams
|toc=llSetPrimitiveParams
|i1_type=integer|i1_name=type_flag|i1_disp=flag
|i1_type=integer|i1_name=type_flag|i1_disp=flag
Line 58: Line 71:
|constants=
|constants=
{{LSL ConstRow|CHANGED_SHAPE}}
{{LSL ConstRow|CHANGED_SHAPE}}
|caveats=
*PRIM_TYPE changes are limited to a linkset of 10 prims or less with [[llSetLinkPrimitiveParams]] & [[llSetLinkPrimitiveParamsFast]]. Workaround this by looping through the entire linkset (you will consider using the fast version).
|functions=
|functions=
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}

Revision as of 18:18, 19 October 2010

Description

Constant: integer PRIM_TYPE = 9;

The integer constant PRIM_TYPE has the value 9

Gets or sets the type of the prim and associated type parameters.

llSetPrimitiveParams

[ PRIM_TYPE, integer flag ] + flag_parameters
• integer flag PRIM_TYPE_* flag

Used with llSetPrimitiveParams & llSetLinkPrimitiveParams.

The values needed for flag_parameters is dependent on flag, please refer to the individual PRIM_TYPE_* articles for additional information.

Caveats

All Issues ~ Search JIRA for related Bugs

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_TYPE ]);

Returns the list [ integer flag ] + flag_parameters

• integer flag PRIM_TYPE_* flag

The values that follow after flag, the flag_parameters, are dependent on the value of flag, please refer to the individual PRIM_TYPE_* articles for further information.

flag Constants flag_parameters
PRIM_TYPE_BOX 0 [ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
PRIM_TYPE_CYLINDER 1 [ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
PRIM_TYPE_PRISM 2 [ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
PRIM_TYPE_SPHERE 3 [ integer hole_shape, vector cut, float hollow, vector twist, vector dimple]
PRIM_TYPE_TORUS 4 [ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ]
PRIM_TYPE_TUBE 5 [ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ]
PRIM_TYPE_RING 6 [ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ]
PRIM_TYPE_SCULPT 7 [ string mapinteger type ]

Related Articles

Constants

•  CHANGED_SHAPE

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_TYPE = 9;