ColorAttrib

from panda3d.core import ColorAttrib
class ColorAttrib

Bases:

Bases: RenderAttrib

Indicates what color should be applied to renderable geometry.

Inheritance diagram

Inheritance diagram of ColorAttrib

enum Type
enumerator T_vertex = 0
enumerator T_flat = 1
enumerator T_off = 2
property class_slot int
property color LColor

If the type is T_flat or T_off, this returns the color that will be applied to geometry. If the type is T_vertex, this is meaningless.

property color_type Type

Returns the type of color specified by this ColorAttrib. The options are:

T_vertex - use the vertex color specified in the geometry itself.

T_flat - use the color specified in this ColorAttrib for all geometry. You can get this color via get_color().

T_off - use the color white.

static get_class_slot() int
static get_class_type() TypeHandle
get_color() LColor

If the type is T_flat or T_off, this returns the color that will be applied to geometry. If the type is T_vertex, this is meaningless.

get_color_type() Type

Returns the type of color specified by this ColorAttrib. The options are:

T_vertex - use the vertex color specified in the geometry itself.

T_flat - use the color specified in this ColorAttrib for all geometry. You can get this color via get_color().

T_off - use the color white.

static make_default() RenderAttrib

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

static make_flat(color: LColor) RenderAttrib

Constructs a new ColorAttrib object that indicates geometry should be rendered in the indicated color.

static make_off() RenderAttrib

Constructs a new ColorAttrib object that indicates geometry should be rendered in white.

static make_vertex() RenderAttrib

Constructs a new ColorAttrib object that indicates geometry should be rendered according to its own vertex color.