panda3d.egg.EggMaterial

class EggMaterial

Bases: EggNode

Inheritance diagram

Inheritance diagram of EggMaterial

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

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

Setter

Return type

LColor

property base
Getter

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

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

LColor

clearAmb() → None
clearBase() → None

New in version 1.10.0.

clearDiff() → None
clearEmit() → None
clearIor() → None

New in version 1.10.0.

clearLocal() → None
clearMetallic() → None

New in version 1.10.0.

clearRoughness() → None

New in version 1.10.0.

clearShininess() → None
clearSpec() → None
property diff
Getter

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

Setter

Return type

LColor

property emit
Getter

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

Setter

Return type

LColor

getAmb() → LColor

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

Return type

LColor

getBase() → LColor

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

New in version 1.10.0.

Return type

LColor

static getClassType() → TypeHandle
Return type

TypeHandle

getDiff() → LColor

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

Return type

LColor

getEmit() → LColor

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

Return type

LColor

getIor() → float

New in version 1.10.0.

getLocal() → bool
getMetallic() → float

New in version 1.10.0.

getRoughness() → float

New in version 1.10.0.

getShininess() → float
getSpec() → LColor

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

Return type

LColor

hasAmb() → bool
hasBase() → bool

New in version 1.10.0.

hasDiff() → bool
hasEmit() → bool
hasIor() → bool

New in version 1.10.0.

hasLocal() → bool
hasMetallic() → bool

New in version 1.10.0.

hasRoughness() → bool

New in version 1.10.0.

hasShininess() → bool
hasSpec() → bool
property ior
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

float

isEquivalentTo(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

Getter Setter

Return type

bool

property metallic
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

float

property roughness
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

float

setAmb(amb: LColor) → None
setBase(base: LColor) → None

New in version 1.10.0.

setDiff(diff: LColor) → None
setEmit(emit: LColor) → None
setIor(ior: float) → None

New in version 1.10.0.

setLocal(local: bool) → None
setMetallic(metallic: float) → None

New in version 1.10.0.

setRoughness(roughness: float) → None

New in version 1.10.0.

setShininess(shininess: float) → None
setSpec(spec: LColor) → None
property shininess

Getter Setter

Return type

float

sortsLessThan(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 isEquivalentTo().

property spec
Getter

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

Setter

Return type

LColor