PyMaterialXCore

Core MaterialX elements and graph traversal.

Classes

AttributeDef

An attribute definition element within a Document.

Backdrop

A layout element used to contain, group, and document nodes within a graph.

Collection

A collection element within a Document.

Color3

A three-component RGB color value.

Color4

A four-component RGBA color value.

CommentElement

An element representing a block of descriptive text within a Document, which will be stored as a comment when the document is written out.

Document

A MaterialX document, which represents the top-level element in the MaterialX ownership hierarchy.

Edge

An edge between two connected Element objects, returned during graph traversal.

Element

The base class for MaterialX elements.

ElementEquivalenceOptions

A set of options for comparing the functional equivalence of elements.

ElementEquivalenceResult

A comparison result for the functional equivalence of two elements.

ElementPredicate

A function that takes an Element and returns a bool, to check whether some criteria has passed.

GenericElement

A generic element subclass, for instantiating elements with unrecognized categories.

GeomElement

The base class for geometric elements, which support bindings to geometries and geometric collections.

GeomInfo

A geometry info element within a Document.

GeomProp

A geometric property element within a GeomInfo.

GeomPropDef

An element representing a declaration of geometric property data.

GraphElement

The base class for graph elements.

GraphIterator

An iterator representing the state of an upstream graph traversal.

Implementation

An implementation element within a Document.

InheritanceIterator

An iterator representing the current state of an inheritance traversal.

Input

An input element within a Node or NodeDef.

InterfaceElement

The base class for interface elements.

LinearUnitConverter

A UnitConverter class for linear units that require only a scalar multiplication.

Look

A look element within a Document.

LookGroup

A look group element within a Document.

MaterialAssign

A material assignment element within a Look.

Matrix33

A 3x3 matrix of floating-point values.

Matrix44

A 4x4 matrix of floating-point values.

MatrixBase

The base class for square matrices of scalar values.

Member

A member element within a TypeDef.

NewlineElement

An element representing a newline within a Document.

Node

A node element within a NodeGraph or Document.

NodeDef

A node definition element within a Document.

NodeGraph

A node graph element within a Document.

NodePredicate

A function that takes a Node and returns a bool, to check whether some criteria has passed.

Output

A spatially-varying output element within a NodeGraph or NodeDef.

PortElement

The base class for port elements.

Property

A property element within a PropertySet.

PropertyAssign

A property assignment element within a Look.

PropertySet

A property set element within a Document.

PropertySetAssign

A property set assignment element within a Look.

StringResolver

A helper object for applying string modifiers to data values in the context of a specific element and geometry.

TargetDef

The definition of an implementation target as a TypedElement.

Token

A token element representing a string value.

TreeIterator

An iterator representing the state of a tree traversal.

TypeDef

A type definition element within a Document.

TypedElement

The base class for typed elements.

TypedValue_boolean

A Value storing a bool value.

TypedValue_booleanarray

A Value storing a list of bool values.

TypedValue_color3

A Value storing a Color3 value.

TypedValue_color4

A Value storing a Color4 value.

TypedValue_float

A Value storing a float value.

TypedValue_floatarray

A Value storing a list of float values.

TypedValue_integer

A Value storing an int value.

TypedValue_integerarray

A Value storing a list of int values.

TypedValue_matrix33

A Value storing a Matrix33 value.

TypedValue_matrix44

A Value storing a Matrix44 value.

TypedValue_string

A Value storing a str value.

TypedValue_stringarray

A Value storing a list of str values.

TypedValue_vector2

A Value storing a Vector2 value.

TypedValue_vector3

A Value storing a Vector3 value.

TypedValue_vector4

A Value storing a Vector4 value.

Unit

A unit declaration element within a UnitDef.

UnitConverter

An abstract base class for unit converters.

UnitConverterRegistry

A registry for UnitConverter objects.

UnitDef

A unit definition element within a Document.

UnitTypeDef

A unit type definition element within a Document.

Value

A generic, discriminated value, whose type may be queried dynamically.

ValueElement

The base class for elements that support typed values.

Variant

A variant element within a VariantSet.

VariantAssign

A variant assignment element within a Look.

VariantSet

A variant set element within a Document.

Vector2

A vector of two floating-point values.

Vector3

A vector of three floating-point values.

Vector4

A vector of four floating-point values.

VectorBase

The base class for vectors of scalar values.

Visibility

A visibility element within a Look.

Exception Types

Exception

The base class for exceptions that are propagated from the MaterialX library to the client application.

ExceptionFoundCycle

A type of exception that is raised when a traversal call encounters a cycle.

ExceptionOrphanedElement

A type of exception that is raised when an Element is used after its owning Document has gone out of scope.

Module Functions

createDocument()

createNamePath(arg0)

createValidName(name[, replaceChar])

geomStringsMatch(arg0, arg1, arg2)

getConnectedOutputs(arg0)

getGeometryBindings(materialNode[, geom])

getShaderNodes(materialNode[, nodeType, target])

getVersionIntegers()

getVersionString()

incrementName(arg0)

isValidName(arg0)

joinStrings(arg0, arg1)

parentNamePath(arg0)

prettyPrint(arg0)

replaceSubstrings(arg0, arg1)

splitNamePath(arg0)

splitString(arg0, arg1)

stringEndsWith(arg0, arg1)

stringStartsWith(arg0, arg1)

targetStringsMatch(arg0, arg1)

PyMaterialXCore Module Function Documentation

createDocument() Document
createNamePath(arg0: list[str]) str
createValidName(name: str, replaceChar: str = '_') str
geomStringsMatch(arg0: str, arg1: str, arg2: bool) bool
getConnectedOutputs(arg0: Node) list[Output]
getGeometryBindings(materialNode: Node, geom: str = '/') list[MaterialAssign]
getShaderNodes(materialNode: Node, nodeType: str = 'surfaceshader', target: str = '') list[Node]
getVersionIntegers() tuple[int, int, int]
getVersionString() str
incrementName(arg0: str) str
isValidName(arg0: str) bool
joinStrings(arg0: list[str], arg1: str) str
parentNamePath(arg0: str) str
prettyPrint(arg0: Element) str
replaceSubstrings(arg0: str, arg1: dict[str, str]) str
splitNamePath(arg0: str) list[str]
splitString(arg0: str, arg1: str) list[str]
stringEndsWith(arg0: str, arg1: str) bool
stringStartsWith(arg0: str, arg1: str) bool
targetStringsMatch(arg0: str, arg1: str) bool

Module source: MaterialX / source / PyMaterialX / PyMaterialXCore /