TextureAttrib
from panda3d.core import TextureAttrib
- class TextureAttrib
Bases:
RenderAttrib
Indicates the set of TextureStages and their associated Textures that should be applied to (or removed from) a node.
Inheritance diagram
- __init__(*args, **kwargs)
- addOffStage()
C++ Interface: add_off_stage(TextureAttrib self, TextureStage stage, int override)
- /**
Returns a new TextureAttrib, just like this one, but with the indicated
stage added to the list of stages turned off by this attrib.
*/
- addOnStage()
C++ Interface: add_on_stage(TextureAttrib self, TextureStage stage, Texture tex) add_on_stage(TextureAttrib self, TextureStage stage, Texture tex, const SamplerState sampler, int override) add_on_stage(TextureAttrib self, TextureStage stage, Texture tex, int override)
- add_off_stage()
C++ Interface: add_off_stage(TextureAttrib self, TextureStage stage, int override)
- /**
Returns a new TextureAttrib, just like this one, but with the indicated
stage added to the list of stages turned off by this attrib.
*/
- add_on_stage()
C++ Interface: add_on_stage(TextureAttrib self, TextureStage stage, Texture tex) add_on_stage(TextureAttrib self, TextureStage stage, Texture tex, const SamplerState sampler, int override) add_on_stage(TextureAttrib self, TextureStage stage, Texture tex, int override)
- class_slot = 28
- findOnStage()
C++ Interface: find_on_stage(TextureAttrib self, const TextureStage stage)
- /**
Returns the index number of the indicated TextureStage within the list of
on_stages, or -1 if the indicated stage is not listed.
*/
- find_on_stage()
C++ Interface: find_on_stage(TextureAttrib self, const TextureStage stage)
- /**
Returns the index number of the indicated TextureStage within the list of
on_stages, or -1 if the indicated stage is not listed.
*/
- getClassSlot()
C++ Interface: get_class_slot()
- getClassType()
C++ Interface: get_class_type()
- getFfTcIndex()
C++ Interface: get_ff_tc_index(TextureAttrib self, int n)
- /**
For each TextureStage listed in get_on_ff_stage(), this returns a unique
index number for the texture coordinate name used by that TextureStage. It
is guaranteed to remain the same index number for each texcoord name (for a
given set of TextureStages), even if the texture render order changes.
*/
- getNumOffStages()
C++ Interface: get_num_off_stages(TextureAttrib self)
- /**
Returns the number of stages that are turned off by the attribute.
*/
- getNumOnFfStages()
C++ Interface: get_num_on_ff_stages(TextureAttrib self)
- /**
Returns the number of on-stages that are relevant to the classic fixed
function pipeline. This excludes texture stages such as normal maps.
*/
- getNumOnStages()
C++ Interface: get_num_on_stages(TextureAttrib self)
- /**
Returns the number of stages that are turned on by the attribute.
*/
- getOffStage()
C++ Interface: get_off_stage(TextureAttrib self, int n)
- /**
Returns the nth stage turned off by the attribute, sorted in arbitrary
(pointer) order.
*/
- getOffStages()
- getOnFfStage()
C++ Interface: get_on_ff_stage(TextureAttrib self, int n)
- /**
Returns the nth stage turned on by the attribute, sorted in render order,
including only those relevant to the classic fixed function pipeline. This
excludes texture stages such as normal maps.
*/
- getOnFfStages()
- getOnSampler()
C++ Interface: get_on_sampler(TextureAttrib self, TextureStage stage)
- /**
Returns the sampler associated with the indicated stage, or the one
associated with its texture if no custom stage has been specified. It is
an error to call this if the stage does not exist.
*/
- getOnStage()
C++ Interface: get_on_stage(TextureAttrib self, int n)
- /**
Returns the nth stage turned on by the attribute, sorted in render order.
*/
- getOnStageOverride()
C++ Interface: get_on_stage_override(TextureAttrib self, TextureStage stage)
- /**
Returns the override value associated with the indicated stage.
*/
- getOnStages()
- getOnTexture()
C++ Interface: get_on_texture(TextureAttrib self, TextureStage stage)
- /**
Returns the texture associated with the indicated stage, or NULL if no
texture is associated.
*/
- getTexture()
C++ Interface: get_texture(TextureAttrib self)
- /**
If the TextureAttrib is not an ‘off’ TextureAttrib, returns the base-level
texture that is associated. Otherwise, return NULL.
*/
- get_class_slot()
C++ Interface: get_class_slot()
- get_class_type()
C++ Interface: get_class_type()
- get_ff_tc_index()
C++ Interface: get_ff_tc_index(TextureAttrib self, int n)
- /**
For each TextureStage listed in get_on_ff_stage(), this returns a unique
index number for the texture coordinate name used by that TextureStage. It
is guaranteed to remain the same index number for each texcoord name (for a
given set of TextureStages), even if the texture render order changes.
*/
- get_num_off_stages()
C++ Interface: get_num_off_stages(TextureAttrib self)
- /**
Returns the number of stages that are turned off by the attribute.
*/
- get_num_on_ff_stages()
C++ Interface: get_num_on_ff_stages(TextureAttrib self)
- /**
Returns the number of on-stages that are relevant to the classic fixed
function pipeline. This excludes texture stages such as normal maps.
*/
- get_num_on_stages()
C++ Interface: get_num_on_stages(TextureAttrib self)
- /**
Returns the number of stages that are turned on by the attribute.
*/
- get_off_stage()
C++ Interface: get_off_stage(TextureAttrib self, int n)
- /**
Returns the nth stage turned off by the attribute, sorted in arbitrary
(pointer) order.
*/
- get_off_stages()
- get_on_ff_stage()
C++ Interface: get_on_ff_stage(TextureAttrib self, int n)
- /**
Returns the nth stage turned on by the attribute, sorted in render order,
including only those relevant to the classic fixed function pipeline. This
excludes texture stages such as normal maps.
*/
- get_on_ff_stages()
- get_on_sampler()
C++ Interface: get_on_sampler(TextureAttrib self, TextureStage stage)
- /**
Returns the sampler associated with the indicated stage, or the one
associated with its texture if no custom stage has been specified. It is
an error to call this if the stage does not exist.
*/
- get_on_stage()
C++ Interface: get_on_stage(TextureAttrib self, int n)
- /**
Returns the nth stage turned on by the attribute, sorted in render order.
*/
- get_on_stage_override()
C++ Interface: get_on_stage_override(TextureAttrib self, TextureStage stage)
- /**
Returns the override value associated with the indicated stage.
*/
- get_on_stages()
- get_on_texture()
C++ Interface: get_on_texture(TextureAttrib self, TextureStage stage)
- /**
Returns the texture associated with the indicated stage, or NULL if no
texture is associated.
*/
- get_texture()
C++ Interface: get_texture(TextureAttrib self)
- /**
If the TextureAttrib is not an ‘off’ TextureAttrib, returns the base-level
texture that is associated. Otherwise, return NULL.
*/
- hasAllOff()
C++ Interface: has_all_off(TextureAttrib self)
- /**
Returns true if this attrib turns off all stages (although it may also turn
some on).
*/
- hasOffStage()
C++ Interface: has_off_stage(TextureAttrib self, TextureStage stage)
- /**
Returns true if the indicated stage is turned off by the attrib, false
otherwise.
*/
- hasOnStage()
C++ Interface: has_on_stage(TextureAttrib self, TextureStage stage)
- /**
Returns true if the indicated stage is turned on by the attrib, false
otherwise.
*/
- has_all_off()
C++ Interface: has_all_off(TextureAttrib self)
- /**
Returns true if this attrib turns off all stages (although it may also turn
some on).
*/
- has_off_stage()
C++ Interface: has_off_stage(TextureAttrib self, TextureStage stage)
- /**
Returns true if the indicated stage is turned off by the attrib, false
otherwise.
*/
- has_on_stage()
C++ Interface: has_on_stage(TextureAttrib self, TextureStage stage)
- /**
Returns true if the indicated stage is turned on by the attrib, false
otherwise.
*/
- isIdentity()
C++ Interface: is_identity(TextureAttrib self)
- /**
Returns true if this is an identity attrib: it does not change the set of
stages in use.
*/
- isOff()
C++ Interface: is_off(TextureAttrib self)
- /**
Returns true if the TextureAttrib is an ‘off’ TextureAttrib, indicating
that it should disable texturing.
If multitexture is in effect, a TextureAttrib may not be strictly “on” or
“off”; therefore, to get a more precise answer to this question, you should
consider using has_all_off() or get_num_off_stages() or has_off_stage()
instead.
*/
- is_identity()
C++ Interface: is_identity(TextureAttrib self)
- /**
Returns true if this is an identity attrib: it does not change the set of
stages in use.
*/
- is_off()
C++ Interface: is_off(TextureAttrib self)
- /**
Returns true if the TextureAttrib is an ‘off’ TextureAttrib, indicating
that it should disable texturing.
If multitexture is in effect, a TextureAttrib may not be strictly “on” or
“off”; therefore, to get a more precise answer to this question, you should
consider using has_all_off() or get_num_off_stages() or has_off_stage()
instead.
*/
- make()
C++ Interface: make() make(Texture tex)
// These methods are used to create a simple, single-textured layer. For // multitexture, use the multitexture interfaces, further below.
// The following methods define the new multitexture mode for TextureAttrib. // Each TextureAttrib can add or remove individual texture stages from the // complete set of textures that are to be applied; this is similar to the // mechanism of LightAttrib.
- makeAllOff()
C++ Interface: make_all_off()
- /**
Constructs a new TextureAttrib object that turns off all stages (and hence
disables texturing).
*/
- makeDefault()
C++ Interface: make_default()
- /**
Returns a RenderAttrib that corresponds to whatever the standard default
properties for render attributes of this type ought to be.
*/
- makeOff()
C++ Interface: make_off()
- /**
Constructs a new TextureAttrib object suitable for rendering untextured
geometry.
*/
- make_all_off()
C++ Interface: make_all_off()
- /**
Constructs a new TextureAttrib object that turns off all stages (and hence
disables texturing).
*/
- make_default()
C++ Interface: make_default()
- /**
Returns a RenderAttrib that corresponds to whatever the standard default
properties for render attributes of this type ought to be.
*/
- make_off()
C++ Interface: make_off()
- /**
Constructs a new TextureAttrib object suitable for rendering untextured
geometry.
*/
- off_stages
- on_stages
- removeOffStage()
C++ Interface: remove_off_stage(TextureAttrib self, TextureStage stage)
- /**
Returns a new TextureAttrib, just like this one, but with the indicated
stage removed from the list of stages turned off by this attrib.
*/
- removeOnStage()
C++ Interface: remove_on_stage(TextureAttrib self, TextureStage stage)
- /**
Returns a new TextureAttrib, just like this one, but with the indicated
stage removed from the list of stages turned on by this attrib.
*/
- remove_off_stage()
C++ Interface: remove_off_stage(TextureAttrib self, TextureStage stage)
- /**
Returns a new TextureAttrib, just like this one, but with the indicated
stage removed from the list of stages turned off by this attrib.
*/
- remove_on_stage()
C++ Interface: remove_on_stage(TextureAttrib self, TextureStage stage)
- /**
Returns a new TextureAttrib, just like this one, but with the indicated
stage removed from the list of stages turned on by this attrib.
*/
- replaceTexture()
C++ Interface: replace_texture(TextureAttrib self, Texture tex, Texture new_tex) replace_texture(TextureAttrib self, Texture tex, NoneType new_tex)
// Let interrogate know this also accepts None
- /**
Returns a new TextureAttrib, just like this one, but with all references to
the given texture replaced with the new texture.
As of Panda3D 1.10.13, new_tex may be null to remove the texture.
@since 1.10.4
*/
- replace_texture()
C++ Interface: replace_texture(TextureAttrib self, Texture tex, Texture new_tex) replace_texture(TextureAttrib self, Texture tex, NoneType new_tex)
// Let interrogate know this also accepts None
- /**
Returns a new TextureAttrib, just like this one, but with all references to
the given texture replaced with the new texture.
As of Panda3D 1.10.13, new_tex may be null to remove the texture.
@since 1.10.4
*/
- samplers
- textures