Skip to main content

model

Functions​

projectGraph()​

function projectGraph(
document,
scope?,
catalog?
): object;

Adapt the semantic graph to the canvas, including fallback positions for unplaced nodes.

Parameters​

ParameterTypeDefault value
documentMaterialXDocumentundefined
scope?string''
catalog?MaterialXNodeSpec[]...

Returns​

object

NameType
nodesGraphNode[]
edgesGraphEdge[]

previewXml()​

function previewXml(document, catalog?): string;

Parameters​

ParameterType
documentMaterialXDocument
catalog?MaterialXNodeSpec[]

Returns​

string


createDefaultDocument()​

function createDefaultDocument(): MaterialXDocument;

Returns​

MaterialXDocument


importMaterial()​

function importMaterial(data, name): MaterialXPackage;

Parameters​

ParameterType
dataUint8Array
namestring

Returns​

MaterialXPackage


exportMaterial()​

function exportMaterial(
pkg,
zip,
catalog?
): Uint8Array;

Parameters​

ParameterType
pkgMaterialXPackage
zipboolean
catalog?MaterialXNodeSpec[]

Returns​

Uint8Array

Interfaces​

GraphNode​

Extends​

  • GraphNode

Properties​

PropertyTypeDescriptionInherited from
idstring-SemanticGraphNode.id
elementMaterialXElement-SemanticGraphNode.element
inputsMaterialXNodePortSpec[]-SemanticGraphNode.inputs
outputsMaterialXNodePortSpec[]-SemanticGraphNode.outputs
type?stringInferred output type; absent while the family is ambiguous.SemanticGraphNode.type
definition?MaterialXNodeSpecConcrete fallback for implicit defaults. Does not constrain the inferred type.SemanticGraphNode.definition
candidates?MaterialXNodeSpec[]Compatible definition variants for this node.SemanticGraphNode.candidates
compoundScope?stringDocument scope containing this compound node’s implementation, when available.SemanticGraphNode.compoundScope
positionPoint--

References​

addNode​

Re-exports addNode


cloneNode​

Re-exports cloneNode


connectNodes​

Re-exports connectNodes


connectionError​

Re-exports connectionError


disconnectInput​

Re-exports disconnectInput


getNodeCatalog​

Re-exports getNodeCatalog


graphScopes​

Re-exports graphScopes


moveNodes​

Re-exports moveNodes


removeNodes​

Re-exports removeNodes


renameNode​

Re-exports renameNode


resetInput​

Re-exports resetInput


setInputValue​

Re-exports setInputValue


materializeDocument​

Re-exports materializeDocument


resolveTypes​

Re-exports resolveTypes


GraphConnection​

Re-exports GraphConnection


GraphEdge​

Re-exports GraphEdge


Point​

Re-exports Point


nodeType​

Re-exports nodeType


findNodeSpec​

Re-exports findNodeSpec


MaterialXDocument​

Re-exports MaterialXDocument


MaterialXElement​

Re-exports MaterialXElement


MaterialXNodeSpec​

Re-exports MaterialXNodeSpec


MaterialXNodePortSpec​

Re-exports MaterialXNodePortSpec


getNodeFamilies​

Re-exports getNodeFamilies


autoLayout​

Re-exports autoLayout


visibleInputs​

Re-exports visibleInputs

Type Aliases​

EditorMode​

type EditorMode = "view" | "edit";