RenderEffects¶
from acron.core import RenderEffects
- class RenderEffects¶
Bases:
Bases:
TypedWritableReferenceCountThis represents a unique collection of
RenderEffectobjects 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
digraph inheritance178ad2c17f { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "RenderEffects" [URL="acron.core.RenderEffects.html#acron.core.RenderEffects",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "RenderEffects" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }- __getitem__()¶
Returns the nth effect in the state.
Returns the effect in the state with the given type.
- __lt__()¶
- add_effect()¶
Returns a new
RenderEffectsobject that represents the same as the source state, with the newRenderEffectadded. If there is already aRenderEffectwith the same type, it is replaced.
- find_effect()¶
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 get_class_type()¶
- get_effect()¶
Returns the nth effect in the state.
Looks for a
RenderEffectof the indicated type in the state, and returns it if it is found, or NULL if it is not.
- get_num_effects()¶
Returns the number of separate effects indicated in the state.
Deprecated: in Python, use len(effects) instead, or effects.size() in C++.
- static get_num_states()¶
Returns the total number of unique
RenderEffectsobjects allocated in the world. This will go up and down during normal operations.
- is_empty()¶
Returns true if the state is empty, false otherwise.
- static list_states()¶
Lists all of the
RenderEffectsin 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 make()¶
Returns a
RenderEffectswith one effect set.Returns a
RenderEffectswith two effects set.Returns a
RenderEffectswith three effects set.Returns a
RenderEffectswith four effects set.
- static make_empty()¶
Returns a
RenderEffectswith no effects set.
- output()¶
- remove_effect()¶
Returns a new
RenderEffectsobject that represents the same as the source state, with the indicatedRenderEffectremoved.
- size()¶
Returns the number of separate effects indicated in the state.
- static validate_states()¶
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
RenderEffectsobjects).
- write()¶