panda3d.egg.EggMaterial

from panda3d.egg import EggMaterial
class EggMaterial

Bases: EggNode

Inheritance diagram

Inheritance diagram of EggMaterial

__init__(copy: EggMaterial) → None
__init__(mref_name: str) → None
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.

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

setBase(base: LColor) → None

New in version 1.10.0.

clearBase() → None

New in version 1.10.0.

hasBase() → bool

New in version 1.10.0.

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

setDiff(diff: LColor) → None
clearDiff() → None
hasDiff() → bool
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

setAmb(amb: LColor) → None
clearAmb() → None
hasAmb() → bool
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

setEmit(emit: LColor) → None
clearEmit() → None
hasEmit() → bool
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

setSpec(spec: LColor) → None
clearSpec() → None
hasSpec() → bool
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

setShininess(shininess: float) → None
clearShininess() → None
hasShininess() → bool
getShininess() → float
setRoughness(roughness: float) → None

New in version 1.10.0.

clearRoughness() → None

New in version 1.10.0.

hasRoughness() → bool

New in version 1.10.0.

getRoughness() → float

New in version 1.10.0.

setMetallic(metallic: float) → None

New in version 1.10.0.

clearMetallic() → None

New in version 1.10.0.

hasMetallic() → bool

New in version 1.10.0.

getMetallic() → float

New in version 1.10.0.

setIor(ior: float) → None

New in version 1.10.0.

clearIor() → None

New in version 1.10.0.

hasIor() → bool

New in version 1.10.0.

getIor() → float

New in version 1.10.0.

setLocal(local: bool) → None
clearLocal() → None
hasLocal() → bool
getLocal() → bool
static getClassType() → TypeHandle
Return type

TypeHandle

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

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

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

property shininess

Getter Setter

Return type

float

property roughness
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

float

property metallic
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

float

property ior
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

Return type

float

property local

Getter Setter

Return type

bool

enum Equivalence
enumerator E_attributes = 1
enumerator E_mref_name = 2