EggMaterial

from panda3d.egg import EggMaterial
class EggMaterial

Bases:

Bases: EggNode

Inheritance diagram

Inheritance diagram of EggMaterial

enum Equivalence
enumerator E_attributes = 1
enumerator E_mref_name = 2
__init__(copy: EggMaterial)
__init__(mref_name: str)
property amb LColor
Getter

It is legal to call this even if has_amb() returns false. If so, it simply returns the default amb color.

Setter

property base LColor
Getter

It is legal to call this even if has_base() returns false. If so, it simply returns the default base color.

New in version 1.10.0.

Setter

New in version 1.10.0.

clear_amb()
clear_base()

New in version 1.10.0.

clear_diff()
clear_emit()
clear_ior()

New in version 1.10.0.

clear_local()
clear_metallic()

New in version 1.10.0.

clear_roughness()

New in version 1.10.0.

clear_shininess()
clear_spec()
property diff LColor
Getter

It is legal to call this even if has_diff() returns false. If so, it simply returns the default diff color.

Setter

property emit LColor
Getter

It is legal to call this even if has_emit() returns false. If so, it simply returns the default emit color.

Setter

get_amb() panda3d.core.LColor

It is legal to call this even if has_amb() returns false. If so, it simply returns the default amb color.

get_base() panda3d.core.LColor

It is legal to call this even if has_base() returns false. If so, it simply returns the default base color.

New in version 1.10.0.

static get_class_type() panda3d.core.TypeHandle
get_diff() panda3d.core.LColor

It is legal to call this even if has_diff() returns false. If so, it simply returns the default diff color.

get_emit() panda3d.core.LColor

It is legal to call this even if has_emit() returns false. If so, it simply returns the default emit color.

get_ior() float

New in version 1.10.0.

get_local() bool
get_metallic() float

New in version 1.10.0.

get_roughness() float

New in version 1.10.0.

get_shininess() float
get_spec() panda3d.core.LColor

It is legal to call this even if has_spec() returns false. If so, it simply returns the default spec color.

has_amb() bool
has_base() bool

New in version 1.10.0.

has_diff() bool
has_emit() bool
has_ior() bool

New in version 1.10.0.

has_local() bool
has_metallic() bool

New in version 1.10.0.

has_roughness() bool

New in version 1.10.0.

has_shininess() bool
has_spec() bool
property ior float

New in version 1.10.0.

is_equivalent_to(other: EggMaterial, eq: int) bool

Returns true if the two materials are equivalent in all relevant properties (according to eq), false otherwise.

The Equivalence parameter, eq, should be set to the bitwise OR of the following properties, according to what you consider relevant:

EggMaterial::E_attributes: All material attributes (diff, spec, etc.) except MRef name.

EggMaterial::E_mref_name: The MRef name.

property local bool
property metallic float

New in version 1.10.0.

property roughness float

New in version 1.10.0.

set_amb(amb: panda3d.core.LColor)
set_base(base: panda3d.core.LColor)

New in version 1.10.0.

set_diff(diff: panda3d.core.LColor)
set_emit(emit: panda3d.core.LColor)
set_ior(ior: float)

New in version 1.10.0.

set_local(local: bool)
set_metallic(metallic: float)

New in version 1.10.0.

set_roughness(roughness: float)

New in version 1.10.0.

set_shininess(shininess: float)
set_spec(spec: panda3d.core.LColor)
property shininess float
sorts_less_than(other: EggMaterial, eq: int) bool

An ordering operator to compare two materials for sorting order. This imposes an arbitrary ordering useful to identify unique materials, according to the indicated Equivalence factor. See is_equivalent_to().

property spec LColor
Getter

It is legal to call this even if has_spec() returns false. If so, it simply returns the default spec color.

Setter