Publishing Definitions

Utility Layout

The first document window shows the deocument that is loaded in. It can be pasted or copied using the shortcut icons.

The create definition tab allows you to modify attribute such as the node group, version contral, documentation and namespace. You can choose from the available nodegraphs from the dropdown at the top of the tab.

Once the dfeinition has been modified "create definition" button is used to view the result in the node definition and node graph implementation windows below. The definition can then be saved using the "save definition" button for use with other utiliies such as the Node Graph Editor utility.

Publishing Definitions

This example uses cross pattern (unlit_cross.mtlx)

The goal here is to publish a new cross pattern using the cross pattern. Start by modifying cross_graph subgraph in the MaterialX Graph Editor utility. The rotation value is changed to 45. The code is then copied for use with the Publishing Utility by going to the graph and copying to the clipboard.

Publishing A New Cross Pattern Definition

The code is pasted into the document window at the top. The utility then updates the available nodegraph list, scanning the document to find any graphs that can be turned into a definition. In this example it finds nodegraph cross which is shown in the dropdown next to the "Update Nodegraph List" button.

The Create Definition section allows users to edit a variety of fields such as the category, node group, ui name (user facing name), version, documentation and namespace (prefix for publishing). For the cross pattern the category is changed to corss, version is set to 0,1 and namespace is set to mxlab.

For further fine tuning the input metadata section lists all the modifable inputs for the selected node graph. This data is one way to add in UI hints for display. It include the name, folder (group), hard and soft min/max and UI set size. Scrolling to the inputs for the graph shows where the info is extracted from. The ordering of inputs can also be changed.

Once finished modifying the definition pressing create definition button updates the existing code. Names are generated automatically for inputs and outputs. The window below to the left show the node definition declaration. The right window shows the implementation, the graph referring back to the node definition.

The file can then be saved for use in utilities such as the Graph Editor.

Using the New Cross Pattern in the Graph Editor

This ecample uses the cross pattern(unlit_cross.mtlx)

To create an instance of the new definition go to file > load definitions > seslect file. The status window below the editing window will show a message if the definition is registered successfuly.

Go to libary > default materials > unlit. Double click the editing window and search for the corss pattern. Attach toe the default unlit and view the changes in the model viewer to the right of the editing window.