PbrMaterialAttrib

class PbrMaterialAttrib

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=""]; }
static PbrMaterialAttrib.get_class_slot()
static PbrMaterialAttrib.get_class_type()
PbrMaterialAttrib.get_material()

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

PbrMaterialAttrib.is_off()

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

static PbrMaterialAttrib.make()

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

static PbrMaterialAttrib.make_default()

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

static PbrMaterialAttrib.make_off()

An attribute that removes any inherited material.