Preference file load order, Creating macros—the basics, Opening scripts that use uninstalled macros – Apple Shake 4 User Manual
Page 907

Chapter 30
Installing and Creating Macros
907
Preference File Load Order
Sometimes, macros have to be loaded in a specific order. This is mainly true if one
macro uses another macro to perform its task. If you need to explicitly control the order
in which macros are loaded, this can be accomplished in a variety of ways.
To explicitly control macro load order, do one of the following:
m
Add an include statement at the beginning of the file. For example, if macros.h relies on
common.h being loaded before, start macros.h with:
#include
m
Put all the files you want to load in a directory (for example include/myMacros) and
create a .h file in startup that contains only include statements:
#include
#include
#include
Include files are never loaded twice, so it is okay if two .h files contain the same
#include
Creating Macros—The Basics
The MacroMaker is an interactive tool to help you create new nodes by combining
previously existing nodes. Shake’s scripting language is essentially C-like, so you have
access to an entire programming language to manipulate your scripts. Because the
MacroMaker cannot account for all possibilities, consider the MacroMaker a tool to help
you get started in using Shake’s language. Use the MacroMaker to build the initial files,
and then modify these files to customize your macros.
Note: For online portions of this section, choose Help > Customizing Shake.
For more information, such as about macro structure, common errors when making
macros, and several examples, see “
” on page 914. For a
tutorial on making macros, see Tutorial 8, “Working With Macros,” in the Shake 4
Tutorials.
Opening Scripts That Use Uninstalled Macros
If you open a Shake script that contains macros that you do not have on your system,
you have the option to load the script using a substitute node, or not to load the
script at all. For more information, see Chapter 2, “