Registering new openGL Nodes (procedurals, adjustments) |
Node XML files are automatically loaded without the need for extra python scripts.
The XML library structure follows the default XML Mari structure that is set in the
various examples they provide and included in the shader documentation API help file.
Nodes are automatically detected as long as they are placed into
~\Scripts\ExtensionPack_XXX\Shaders\NodeLibrary
From here the autoloader will automatically detect what type of node it is and properly
register the node automatically without the need for writing anymore python registration files.
To determine what kind of Node it is (Adjustment or Procedural) the autoloader will use the default tags that are found in the Mari XML files.
Valid Tags are
Example A:
<Tags>
<Tag>_adjustment</Tag>
</Tags>
Example B:
<Tags>
<Tag>_procedural</Tag>
</Tags>
If no <Tag> Attribute is found the node will default to Type Procedural.
The name of the Node as it appears in Mari's UI is used from Mari's Default XML Attribute
<DefaultName></DefaultName>
Example:
<DefaultName>Axis Mask</DefaultName> will Name the Node Axis Mask in the Mari UI.
|
If no <DefaultName> Tag is found <ID> Tag will be used and the node will still register, but an error printout will appear in the Python console |
The Node Autoloader of Extension Pack requires an explicit path to accurately place the Node in the Mari UI
Example:
<Category>Filter/Custom/Histogram/</Category>
... will place the node inside the Adjustment Folder with a sub-folder /Custom/Historgram/
Example:
<Category>Procedural/Geometry/Custom/</Category>
...will place the node inside the Geometry Folder in Mari's Procedural Menu with a sub-folder /Custom/
The <ID> tag is a unique Name that allows Mari to identify the Node, regardless of the nameit has in the UI.
The <ID></ID> should never change between Versions of the Node to allow Mari to convert between Versions.
Example:
<ID>Axis Mask</ID>
Restricting Nodes to specific Mari Versions
You can restrict Nodes to load only in specific MARI Versions by using the
<MinMariVersion> and <MaxMariVersion> tags in the Node XML files.
The tags are optional. You can have just a <MinMariVersion> tag, just a <MaxMariVersion> one
or leave them out completely if not required.
Examples:
Restrict a Node to Mari 3.1 or higher: <MinMariVersion>30101000</MinMariVersion>
Restrict a Node to Mari 3.0v3 or lower: <MaxMariVersion>30003300</MaxMariVersion>