Installing macros within a script, Where to install custom interface settings, Where to install icons – Apple Shake 4 User Manual
Page 906

906
Chapter 30
Installing and Creating Macros
This is referred to as the startup directory, and is used for both .h preference files, and
for the installation of macros.
Where to Install Custom Interface Settings
The macro only contains the code necessary to perform the actual function. A custom
UI file allows that macro to display controls for manipulating that macro’s parameters.
The accepted convention is that a macro’s UI file name ends with the letters “UI.” This
makes it easier for people to whom you give your macro to know what files go where.
As an example, for the AutoDOD.h macro, the accompanying UI file should be named
AutoDODUI.h.
Custom UI files belong in a ui directory in the following location:
$HOME/nreal/include/startup/ui
Following the previous example, a common location would be:
/Users/myAccount/nreal/include/startup/ui/AutoDODUI.h
This is referred to as the ui directory, or the startup/ui directory. Files inside it are
referred to as ui .h files.
Files that change additional default settings or add extra controls should be located in
the templates directory, which is always within a ui directory:
/Users/myAccount/nreal/include/startup/ui/templates/defaultfilter.h
Where to Install Icons
If you’re really slick, you can create your own icons to represent your new macro in the
Tool tabs. Icons generally end in .nri.
Icons for custom macros are placed within an icons directory. This can be located
alongside the include directory in the following location:
$HOME/nreal/icons/
Following the previous example, a common location would be:
/Users/my_account/nreal/icons/Layer.CopyDOD.nri
Installing Macros Within a Script
You can also place macros inside of a script itself by copying and pasting it with a text
editor. This guarantees that your macro is found by Shake when rendering that script
on any machine. However, when you do this, you do not have access to any interface-
building functions. Also, if you load the script back into the interface and save it out
again, the macros are lost.