# panda3d.core.RenderEffects¶

from panda3d.core import RenderEffects

class RenderEffects

This represents a unique collection of RenderEffect objects that correspond to a particular renderable state.

You should not attempt to create or modify a RenderEffects object directly. Instead, call one of the make() functions to create one for you. And instead of modifying a RenderEffects object, create a new one.

Inheritance diagram

isEmpty() → bool

Returns true if the state is empty, false otherwise.

getNumEffects() → size_t

Returns the number of separate effects indicated in the state.

Deprecated: in Python, use len(effects) instead, or effects.size() in C++.

Return type

size_t

getEffect(type: TypeHandle) → RenderEffect

Looks for a RenderEffect of the indicated type in the state, and returns it if it is found, or NULL if it is not.

Return type

RenderEffect

getEffect(n: size_t) → RenderEffect

Returns the nth effect in the state.

Return type

RenderEffect

size() → size_t

Returns the number of separate effects indicated in the state.

Return type

size_t

findEffect(type: TypeHandle) → int

Searches for an effect with the indicated type in the state, and returns its index if it is found, or -1 if it is not.

static makeEmpty() → RenderEffects

Returns a RenderEffects with no effects set.

Return type

RenderEffects

static make(effect: RenderEffect) → RenderEffects

Returns a RenderEffects with one effect set.

Return type

RenderEffects

static make(effect1: RenderEffect, effect2: RenderEffect) → RenderEffects

Returns a RenderEffects with two effects set.

Return type

RenderEffects

static make(effect1: RenderEffect, effect2: RenderEffect, effect3: RenderEffect) → RenderEffects

Returns a RenderEffects with three effects set.

Return type

RenderEffects

static make(effect1: RenderEffect, effect2: RenderEffect, effect3: RenderEffect, effect4: RenderEffect) → RenderEffects

Returns a RenderEffects with four effects set.

Return type

RenderEffects

addEffect(effect: RenderEffect) → RenderEffects

Returns a new RenderEffects object that represents the same as the source state, with the new RenderEffect added. If there is already a RenderEffect with the same type, it is replaced.

Return type

RenderEffects

removeEffect(type: TypeHandle) → RenderEffects

Returns a new RenderEffects object that represents the same as the source state, with the indicated RenderEffect removed.

Return type

RenderEffects

output(out: ostream) → None
write(out: ostream, indent_level: int) → None
static getNumStates() → int

Returns the total number of unique RenderEffects objects allocated in the world. This will go up and down during normal operations.

static listStates(out: ostream) → None

Lists all of the RenderEffects in the cache to the output stream, one per line. This can be quite a lot of output if the cache is large, so be prepared.

static validateStates() → bool

Ensures that the cache is still stored in sorted order. Returns true if so, false if there is a problem (which implies someone has modified one of the supposedly-const RenderEffects objects).

static getClassType() → TypeHandle
Return type

TypeHandle