|
MaterialXLab API
0.0.1
APIs For MaterialXLab Libraries
|
Class which will build node graph connectivity information from a MaterialX document. More...
Public Member Functions | |
| constructor (doc) | |
| Constructor. | |
| setIncludeGraphs (graphs) | |
| Set graphs to include. | |
| getDictionary () | |
| Get the graph dictionary. | |
| getConnections () | |
| Get graph connections. | |
| updateGraphDictionaryPath (key, item, nodetype, type, value, graphDictionary) | |
| Update the graph dictionary with a new item. | |
| updateGraphDictionaryItem (item, graphDictionary) | |
| Update the graph dictionary with a new item. | |
| printGraphDictionary (graphDictionary) | |
| Print the graph dictionary. | |
| getParentGraph (elem) | |
| Get the parent graph of an element. | |
| getDefaultOutput (node) | |
| Get the default output of a node. | |
| appendPath (p1, p2) | |
| Append two paths together. | |
| buildPortConnection (doc, portPath, connections, portIsNode) | |
| Store a port connection. | |
| buildConnections (doc, graphElement, connections) | |
| Build the connections between graph elements. | |
| buildGraphDictionary (doc) | |
| Build the graph dictionary. | |
| execute () | |
| Build the graph information. | |
| getJSON (inputFileName) | |
| Get the JSON representation of the graph information. | |
| exportToJSON (filename, inputFileName) | |
| Export the graph information to a JSON file. | |
| importFromJSON (filename) | |
| Import the graph information from a JSON file. | |
Class which will build node graph connectivity information from a MaterialX document.
Definition at line 6 of file JsMaterialXGraph.js.
| MxGraphBuilder::appendPath | ( | p1, | |
| p2 ) |
Append two paths together.
| p1 | Path 1 |
| p2 | Path 2 |
Definition at line 167 of file JsMaterialXGraph.js.
| MxGraphBuilder::buildConnections | ( | doc, | |
| graphElement, | |||
| connections ) |
Build the connections between graph elements.
| doc | Document |
| graphElement | Graph element |
| connections | Set of connections |
Definition at line 305 of file JsMaterialXGraph.js.
| MxGraphBuilder::buildGraphDictionary | ( | doc | ) |
Build the graph dictionary.
| doc | Document |
Definition at line 340 of file JsMaterialXGraph.js.
| MxGraphBuilder::buildPortConnection | ( | doc, | |
| portPath, | |||
| connections, | |||
| portIsNode ) |
Store a port connection.
| doc | Document |
| portPath | Path of the port |
| connections | Set of connections |
| portIsNode | Port is a node |
Definition at line 179 of file JsMaterialXGraph.js.
| MxGraphBuilder::constructor | ( | doc | ) |
| MxGraphBuilder::execute | ( | ) |
Build the graph information.
Definition at line 393 of file JsMaterialXGraph.js.
| MxGraphBuilder::exportToJSON | ( | filename, | |
| inputFileName ) |
Export the graph information to a JSON file.
| filename | Output file name |
| inputFileName | Input file name |
Definition at line 434 of file JsMaterialXGraph.js.
| MxGraphBuilder::getConnections | ( | ) |
Get graph connections.
Definition at line 40 of file JsMaterialXGraph.js.
| MxGraphBuilder::getDefaultOutput | ( | node | ) |
Get the default output of a node.
| node | Node to check |
Definition at line 143 of file JsMaterialXGraph.js.
| MxGraphBuilder::getDictionary | ( | ) |
Get the graph dictionary.
Definition at line 32 of file JsMaterialXGraph.js.
| MxGraphBuilder::getJSON | ( | inputFileName | ) |
Get the JSON representation of the graph information.
| inputFileName | Input file name |
Definition at line 418 of file JsMaterialXGraph.js.
| MxGraphBuilder::getParentGraph | ( | elem | ) |
Get the parent graph of an element.
| elem | Element to check |
Definition at line 131 of file JsMaterialXGraph.js.
| MxGraphBuilder::importFromJSON | ( | filename | ) |
Import the graph information from a JSON file.
| filename | Input file name |
Definition at line 459 of file JsMaterialXGraph.js.
| MxGraphBuilder::printGraphDictionary | ( | graphDictionary | ) |
Print the graph dictionary.
| graphDictionary | Graph dictionary |
Definition at line 97 of file JsMaterialXGraph.js.
| MxGraphBuilder::setIncludeGraphs | ( | graphs | ) |
Set graphs to include.
| graphs | Graphs to include |
Definition at line 24 of file JsMaterialXGraph.js.
| MxGraphBuilder::updateGraphDictionaryItem | ( | item, | |
| graphDictionary ) |
Update the graph dictionary with a new item.
| item | Item to add |
| graphDictionary | Graph dictionary |
Definition at line 68 of file JsMaterialXGraph.js.
| MxGraphBuilder::updateGraphDictionaryPath | ( | key, | |
| item, | |||
| nodetype, | |||
| type, | |||
| value, | |||
| graphDictionary ) |
Update the graph dictionary with a new item.
| key | Key for the dictionary |
| item | Item to add |
| nodetype | Node type |
| type | Type of the node |
| value | Value of the node |
| graphDictionary | Graph dictionary |
Definition at line 54 of file JsMaterialXGraph.js.