Page 1220 - Kitab3DsMax
P. 1220
Part XII: MAXScript and Plug-Ins
Max includes two directories in its default installation that can be used to automatically load scripts when
Max starts. These directories are scripts and scripts\startup, but you can change them using the Configure
Paths dialog box. The Load Startup Scripts option causes any scripts in these directories to be loaded auto-
matically when Max starts.
FIGURE 49.12
The MAXScript panel in the Preference Settings dialog box includes options for controlling MAXScript.
Types of Scripts
All scripts are not created equal, and Max categorizes different scripts based on how they work. For more
information, the MAXScript online help provides exhaustive information on their various options.
The main thing to consider when deciding what type of script to create is the user interface. Ask yourself
what the most logical user interface would be for the type of tool you’re creating, and this gives you a hint
as to which type of script is well suited for the task.
Macro scripts
Macro scripts are scripts created with the Macro Recorder. Any script associated with a toolbar button is
considered a Macro script. Max organizes Macro scripts by their category, which you can change by editing
the script file. To call a Macro script from another script, you can use the macros command. For example,
macros.run “objects” “sphere”
runs the “sphere” script in the “objects” category.
Macro scripts generally require no other user input; you just click a button, and the script works its magic.
1172