PbrMaterialAttrib

from acron.shading import PbrMaterialAttrib
class PbrMaterialAttrib

Bases:

Bases: RenderAttrib

Puts a PbrMaterial on a node: np.set_attrib(PbrMaterialAttrib.make(m)). Like any attribute it is inherited by the node’s children, and a child’s own PbrMaterialAttrib replaces it (or overrides it, with a priority). make_off() explicitly removes an inherited material; the node is then shaded with a default PbrMaterial (or one derived from its Acron Material, see PbrShaderGenerator).

The attribute registers its own slot when the module loads, so it needs nothing from Acron’s core beyond the RenderAttrib registry.

Inheritance diagram

digraph inheritanced41b18ebd6 { 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=""]; "PbrMaterialAttrib" [URL="acron.shading.PbrMaterialAttrib.html#acron.shading.PbrMaterialAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "RenderAttrib" -> "PbrMaterialAttrib" [arrowsize=0.75,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=""]; "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=""]; }
property class_slot → int
static get_class_slot()
static get_class_type()
get_material()

The material, or nullptr for an “off” attribute.

is_off()

True for the attribute that removes an inherited material (and for the default one, which is the same thing).

static make()

An attribute that shades with the given material. The material is shared, not copied: its scalar parameters stay live.

static make_default()

The default attribute (the same as make_off()).

static make_off()

An attribute that removes any inherited material.

property material → PbrMaterial

The material, or nullptr for an “off” attribute.