Difference between revisions of "PRIM COLOR"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 17: Line 17:


}}{{LSL Constant
}}{{LSL Constant
|inject-2={{LSL PrimitiveParam Categorize|Face}}
|name=PRIM_COLOR
|name=PRIM_COLOR
|type=integer
|type=integer
Line 46: Line 47:
{{LSL DefineRow||[[changed]]|}}
{{LSL DefineRow||[[changed]]|}}
|location
|location
|cat1=Prim
|cat1
|cat2=Color
|cat2=Color
|cat3
|cat3
|cat4
|cat4
}}
}}

Revision as of 22:24, 1 July 2012

Description

Constant: integer PRIM_COLOR = 18;

The integer constant PRIM_COLOR has the value 18

Used to get or set the color and alpha of a prim's face.

llSetPrimitiveParams

[ PRIM_COLOR, integer face, vector color, float alpha ]
• integer face face number or ALL_SIDES
• vector color color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
• float alpha from 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0)

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_COLOR, integer face ]);

Returns the listvector color, float alpha ]

• integer face face number or ALL_SIDES

• vector color color in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
• float alpha from 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0)

Caveats:

Related Articles

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Articles

•  Color in LSL
•  Translucent Color

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_COLOR = 18;