Macros

Macros are nodes that wrap any single node, or group of nodes, and publish them so that their state is saved and they can be recalled in other projects. You can create a macro from any node by using the wrench menu at the top of the node’s Parameters tab, and choosing Save As Macro... although Macros are more typically - and more usefully - made from groups. You save a macro from a Group node in the same way you would from any other node (by choosing Save as Macro... from the wrench menu in a group’s Parameters tab).

Once you have created a macro, it can be added to a project as you would add a regular node, including from the Tab node creation menu. By default - if no other directory options are set - macros are saved into the Home directory in .katana/Macros/_User and are given the suffix _User.

You can also read macros from other directories included in your $KATANA_RESOURCES environment variable. Macros are picked up from sub-directories called Macros and take the name of the parent directory as suffix. For example, if you point your $KATANA_RESOURCES to /production/katana/studio you can put macros in /production/katana/studio/Macros. Macros which are inside a subdirectory automatically suffixed with the name of the subdirectory.

For example:

Macro Path

Macro Name

/production/katana/studio/Macros/MyMacro.macro

MyMacro

/production/katana/studio/Macros/_User/MyMacro.macro

MyMacro_User

/production/katana/studio/Macros/OtherMacros/MyMacro.macro

MyMacroOtherMacros

If you want the macro to have input or output ports you need to make sure that there are connections to other external nodes when you create the group. For each original connection from an internal node to an external one, the macro creates an appropriate port.