ShaderAttrib¶
from acron.core import ShaderAttrib
- class ShaderAttrib¶
Bases:
Bases:
RenderAttribInheritance diagram
digraph inheritanceae980c69b1 { 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=""]; "RenderAttrib" [URL="acron.core.RenderAttrib.html#acron.core.RenderAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "RenderAttrib" [arrowsize=0.75,style=""]; "ShaderAttrib" [URL="acron.core.ShaderAttrib.html#acron.core.ShaderAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "RenderAttrib" -> "ShaderAttrib" [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=""]; }- auto_gloss_on()¶
- auto_glow_on()¶
- auto_normal_on()¶
- auto_ramp_on()¶
- auto_shader()¶
If true, then this
ShaderAttribdoes not contain an explicit shader - instead, it requests the automatic generation of a shader.
- auto_shadow_on()¶
- clear_all_shader_inputs()¶
Clears all the shader inputs on the attrib.
- clear_flag()¶
- clear_shader()¶
- clear_shader_input()¶
- static get_class_slot()¶
- static get_class_type()¶
- get_flag()¶
- get_instance_count()¶
Returns the number of geometry instances. A value of 0 means not to use instancing at all. This value is ignored if F_hardware_instancing is set.
- get_shader()¶
Returns the shader object associated with the node. If get_override returns true, but get_shader returns NULL, that means that this attribute should disable the shader.
- get_shader_input()¶
Returns the
ShaderInputof the given name. If no such name is found, this function does not return NULL — it returns the “blank”ShaderInput.Returns the
ShaderInputof the given name. If no such name is found, this function does not return NULL — it returns the “blank”ShaderInput.
- get_shader_input_buffer()¶
Returns the
ShaderInputas aShaderBuffer. Assertion fails if there is none, or if it is not aShaderBuffer.
- get_shader_input_matrix()¶
Returns the
ShaderInputas a matrix. Assertion fails if there is none, or if it is not a matrix orNodePath.
- get_shader_input_nodepath()¶
Returns the
ShaderInputas a nodepath. Assertion fails if there is none, or if it is not a nodepath.
- get_shader_input_ptr()¶
Returns the
ShaderInputas a ShaderPtrData struct. Assertion fails if there is none. or if it is not a PTA(double/float)Returns the
ShaderInputas a ShaderPtrData struct. Assertion fails if there is none. or if it is not a PTA(double/float)
- get_shader_input_texture()¶
Returns the
ShaderInputas a texture. Assertion fails if there is none, or if it is not a texture.If sampler is not NULL, the sampler state to use for this texture is assigned to it.
- get_shader_input_vector()¶
Returns the
ShaderInputas a vector. Assertion fails if there is none, or if it is not a vector.
- get_shader_priority()¶
- has_shader()¶
If true, the shader field of this attribute overrides the shader field of the parent attribute.
- has_shader_input()¶
Returns true if there is a
ShaderInputof the given name.
- property instance_count int¶
Returns the number of geometry instances. A value of 0 means not to use instancing at all. This value is ignored if F_hardware_instancing is set.
- static make()¶
Constructs a new
ShaderAttribobject with nothing set.
- static make_default()¶
Returns a
RenderAttribthat corresponds to whatever the standard default properties for render attributes of this type ought to be.
- static make_off()¶
Constructs a new
ShaderAttribobject that disables the use of shaders (it does not clear out all shader data, however.)
- static register_with_read_factory()¶
Factory method to generate a Shader object
- set_flag()¶
- set_instance_count()¶
Sets the geometry instance count. Do not confuse this with instanceTo, which is used for animation instancing, and has nothing to do with this. A value of 0 means not to use instancing at all.
This value should not be set if F_hardware_instancing is also set.
- set_shader()¶
- set_shader_auto()¶
Set auto shader with bitmask to customize use, e.g., to keep normal, glow, etc., on or off
- set_shader_input()¶
Shader Inputs
- set_shader_inputs()¶
Returns a new
ShaderAttribwith the given shader inputs set. This is a more efficient way to set multiple shader inputs than callingset_shader_input()multiple times.
- set_shader_off()¶
- property shader Shader¶
Returns the shader object associated with the node. If get_override returns true, but
get_shader()returns NULL, that means that this attribute should disable the shader.