MaterialAttrib

from panda3d.core import MaterialAttrib
class MaterialAttrib

Bases:

Bases: RenderAttrib

Indicates which, if any, material should be applied to geometry. The material is used primarily to control lighting effects, and isn’t necessary (or useful) in the absence of lighting.

Inheritance diagram

Inheritance diagram of MaterialAttrib

property class_slot int
static get_class_slot()
static get_class_type()
get_material()

If the MaterialAttrib is not an ‘off’ MaterialAttrib, returns the material that is associated. Otherwise, return NULL.

is_off()

Returns true if the MaterialAttrib is an ‘off’ MaterialAttrib, indicating that it should disable the use of materials.

static make()

Constructs a new MaterialAttrib object suitable for rendering the indicated material onto geometry.

static make_default()

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

static make_off()

Constructs a new MaterialAttrib object suitable for rendering unmateriald geometry.

property material Material

If the MaterialAttrib is not an ‘off’ MaterialAttrib, returns the material that is associated. Otherwise, return NULL.