Share

.maxcompound Files

A .maxcompound file defines a MCG compound, which can be used by other tools and compounds. The available compounds appear in the Operator Depot, and may be reloaded manually by selecting Operators > Reload Operators.

Compounds used in other graphs are referenced, meaning that changing a compound's logic will affect all the graphs in which that compound is used.

Tip:

To safely customize the behavior of an existing compound without breaking the graphs in which it is used, we recommend you copy the compound and save it with a new Identifier (see Graph Properties below), then connect the newly customized compound into your graphs.

Compound Inputs

The inputs of a compound must be declared as Compound Input nodes (Inputs > Compounds). You may use the Compound Input: Any node if you prefer to have the input type inferred based on its usage in the graph.

Note:

The order of appearance of the inputs on the resulting node is based on a depth-first traversal from the terminal node. If you rewire your graph to change its implementation, you may inadvertently be modifying the input ordering. Such a change will affect the graphs in which it is used. To determine the extent of your changes, you can manually reload all the compounds (Operators > Reload Operators), then rebuild all the tools (Build > Evaluate All Tools and Packages), and check the MAXScript listener for any error messages caused by your changes.

Compound Outputs

The terminal Output node of a .maxcompound file is the Output: Compound node (Outputs > Compounds), which accepts any type. The output node represents the output connector of the resulting compound node.

Saving

To use a compound in other graphs, it must first be saved (File > Save/Save As... or CTRL+S) to the MCG loading path. By default, compounds saved to either the user's Tools or Compounds directory (under C:\Users\<username>\Autodesk\3ds Max 2018\Max Creation Graph) will appear in the Operator Depot, and may be used in other graphs. See here for more information on customizing the MCG loading path.

To manually repopulate the Operator Depot with all the compounds in the MCG loading path, select Operators > Reload Operators.

Graph Properties

When you save a new compound (File > Save As...), you are prompted with the Graph Properties dialog. This dialog may also be accessed under Edit > Edit Graph Properties.... Changes made to this dialog are applied upon saving (by pressing Save As upon first save, or by pressing OK then CTRL+S if the graph was already saved once).

Identifier

The identifier of a compound is the unique string which identifies it. A graph references other compounds based on this identifier.

We recommend you provide a unique prefix to your compounds in order to avoid collisions with other compounds out in the wild. Compound collisions are not expected unless you share .maxcompound files directly with others, or if you choose to unpack .mcg packages.

Caution:

Changing a compound's identifier will break all the graphs in which it is used. To edit the appearance of the compound's name in the editor, we recommend modifying its Display Name instead (see below).

Graph GUID

This value is generated upon first save, and exists for legacy purposes.

Version

  • Major, Minor: These fields may be incremented manually. We recommend Semantic Versioning for your tools and compounds.

  • Revision: This field is incremented automatically every time the file is saved.

  • Version GUID: A unique GUID generated every time the file is saved.

Display Name

The searchable name associated with your compound in the Operator Depot. You may safely change this value at any time.

Tip:

Consider adding a forward slash and a suffix to quickly identify your nodes in the search list and in the depot, for example " / MCG Samples".

Category

The category of the compound in the Operator Depot. Use a dot notation to nest categories, for example: Geometry.Mesh.Primitives:

> Geometry
    > Mesh
        > Primitives
            <your compound display name>

These fields appear in the Node Properties panel, along with the Identifier, the Filepath and the Version.

Deprecate Compound

When enabled, surrounds the compound with a yellow rectangle. Deprecation is a visual indication that the compound may be removed or replaced in a future update.

Tip:

If you are deprecating one of your own compounds, we suggest you manually add the "DEPRECATED " prefix to the display name, and set its category to "Deprecated.Compounds" so it can be easily identified in graphs and while searching.

Deprecated Message

The message to display about the deprecation status of the compound. If there are alternatives to the deprecation, you may mention these here.

File, Created, Last Modified

The filepath and the dates at which the file was created and modified.

Was this information helpful?