PyMaterialXCore.Element

class Element

Bases: pybind11_object

The base class for MaterialX elements.

An Element is a named object within a Document, which may possess any number of child elements and attributes.

Inherited by: TypedElement, GeomElement, Backdrop, Collection, CommentElement, GenericElement, Look, LookGroup, NewlineElement, PropertySet, TypeDef, Unit, UnitDef, UnitTypeDef, VariantSet, and VariantAssign.

See:

https://materialx.org/docs/api/class_element.html

Methods

__init__(*args, **kwargs)

addChildOfCategory(self, category[, name])

asString(self)

changeChildCategory(self, arg0, arg1)

clearContent(self)

copyContentFrom(self, arg0)

createStringResolver(self[, geom])

createValidChildName(self, arg0)

getActiveColorSpace(self)

getActiveFilePrefix(self)

getActiveGeomPrefix(self)

getActiveSourceUri(self)

getAttribute(self, arg0)

getAttributeNames(self)

getCategory(self)

getChildIndex(self, arg0)

getChildren(self)

getColorSpace(self)

getDescendant(self, arg0)

getDocString(self)

getDocument(self)

getFilePrefix(self)

getGeomPrefix(self)

getInheritString(self)

getInheritsFrom(self)

getName(self)

getNamePath(self[, relativeTo])

getNamespace(self)

getParent(self)

getQualifiedName(self, arg0)

getRoot(self)

getSelf(self)

getSourceUri(self)

getUpstreamEdge(self[, index])

getUpstreamEdgeCount(self)

getUpstreamElement(self[, index])

hasAttribute(self, arg0)

hasColorSpace(self)

hasFilePrefix(self)

hasGeomPrefix(self)

hasInheritString(self)

hasInheritanceCycle(self)

hasInheritedBase(self, arg0)

hasNamespace(self)

hasSourceUri(self)

isEquivalent(self, arg0, arg1)

removeAttribute(self, arg0)

removeChild(self, arg0)

setAttribute(self, arg0, arg1)

setCategory(self, arg0)

setChildIndex(self, arg0, arg1)

setColorSpace(self, arg0)

setDocString(self, arg0)

setFilePrefix(self, arg0)

setGeomPrefix(self, arg0)

setInheritString(self, arg0)

setInheritsFrom(self, arg0)

setName(self, arg0)

setNamespace(self, arg0)

setSourceUri(self, arg0)

traverseGraph(self)

traverseInheritance(self)

traverseTree(self)

validate(self)

Attribute Names

COLOR_SPACE_ATTRIBUTE = 'colorspace'
DOC_ATTRIBUTE = 'doc'
FILE_PREFIX_ATTRIBUTE = 'fileprefix'
GEOM_PREFIX_ATTRIBUTE = 'geomprefix'
INHERIT_ATTRIBUTE = 'inherit'
NAMESPACE_ATTRIBUTE = 'namespace'
NAME_ATTRIBUTE = 'name'
XPOS_ATTRIBUTE = 'xpos'
YPOS_ATTRIBUTE = 'ypos'

Methods

__init__(*args, **kwargs)
addChildOfCategory(self: Element, category: str, name: str = '') Element
asString(self: Element) str
changeChildCategory(self: Element, arg0: Element, arg1: str) Element
clearContent(self: Element) None
copyContentFrom(self: Element, arg0: Element) None
createStringResolver(self: Element, geom: str = '') StringResolver
createValidChildName(self: Element, arg0: str) str
getActiveColorSpace(self: Element) str
getActiveFilePrefix(self: Element) str
getActiveGeomPrefix(self: Element) str
getActiveSourceUri(self: Element) str
getAttribute(self: Element, arg0: str) str
getAttributeNames(self: Element) list[str]
getCategory(self: Element) str
getChildIndex(self: Element, arg0: str) int
getChildren(self: Element) list[Element]
getColorSpace(self: Element) str
getDescendant(self: Element, arg0: str) Element
getDocString(self: Element) str
getDocument(self: Element) Document
getFilePrefix(self: Element) str
getGeomPrefix(self: Element) str
getInheritString(self: Element) str
getInheritsFrom(self: Element) Element
getName(self: Element) str
getNamePath(self: Element, relativeTo: Element = None) str
getNamespace(self: Element) str
getParent(self: Element) Element
getQualifiedName(self: Element, arg0: str) str
getRoot(self: Element) Element
getSelf(self: Element) Element
getSourceUri(self: Element) str
getUpstreamEdge(self: Element, index: int = 0) Edge
getUpstreamEdgeCount(self: Element) int
getUpstreamElement(self: Element, index: int = 0) Element
hasAttribute(self: Element, arg0: str) bool
hasColorSpace(self: Element) bool
hasFilePrefix(self: Element) bool
hasGeomPrefix(self: Element) bool
hasInheritString(self: Element) bool
hasInheritanceCycle(self: Element) bool
hasInheritedBase(self: Element, arg0: Element) bool
hasNamespace(self: Element) bool
hasSourceUri(self: Element) bool
isEquivalent(self: Element, arg0: Element, arg1: ElementEquivalenceOptions) tuple[bool, list[ElementEquivalenceResult]]
removeAttribute(self: Element, arg0: str) None
removeChild(self: Element, arg0: str) None
setAttribute(self: Element, arg0: str, arg1: str) None
setCategory(self: Element, arg0: str) None
setChildIndex(self: Element, arg0: str, arg1: int) None
setColorSpace(self: Element, arg0: str) None
setDocString(self: Element, arg0: str) None
setFilePrefix(self: Element, arg0: str) None
setGeomPrefix(self: Element, arg0: str) None
setInheritString(self: Element, arg0: str) None
setInheritsFrom(self: Element, arg0: Element) None
setName(self: Element, arg0: str) None
setNamespace(self: Element, arg0: str) None
setSourceUri(self: Element, arg0: str) None
traverseGraph(self: Element) GraphIterator
traverseInheritance(self: Element) InheritanceIterator
traverseTree(self: Element) TreeIterator
validate(self: Element) tuple[bool, str]