8

1110 Glossary
MAXScript first searches for
.mcr
(macroScript
definition files) in the
ui\macro scripts
directory.
These macroScript definitions are not compiled at
this t ime; rather they are just scanned to identify
themacroScriptsthathavebeendefined.
MAXScriptnextsearchesfor
.ms
,
.mse
,and
.mzp
files in the plug-in path directories (defined on
the
Configure System Paths dialog (page 3–854)
and
Configure User Paths dialog (page 3–852)
)
and their subdirectories, and compiles these files.
Thebasesceneanduserinterfacehavenotbeen
createdatthispoint,sonoviewportorscene
commandsshouldbeexecutedinthesefiles.These
files should primarily define scripted plug-ins and
utility functions.
AnyutilityfunctionsusedbythemacroScripts
defined when reading the
ui\macroscripts
director y should b e defined in a
.ms
or
.mse
file in
one of these directories. You c an prevent a nested
directory from being scanned by placing its name
in parentheses, for example "(old-versions)",
allowing you to enable and disable scripts in handy
directory-based groupings.
At this point, 3ds Max creates the base scene and
user interface. Any macro scripts used by buttons
intheuserinterfacearecompiledatthistime.
The automatic loading of the following startup
script files can be deact ivated by turning off the
Auto Start MAXScript option in the MAXScript
page of the Preferences dialog, as described in
MAXScript Preferences (page 3–879)
.
MAXScript first searches for a file named
startup. ms
in the following directories, in this
order:
1. The Scripts directory (defined on the C onfigure
User Paths dialog > File I/O panel)
2. The Star tup Scripts directory (defined on the
Configure System Paths dialog)
3. The3dsMaxexecutablemaindirectory
4. The Windows NT 32-bit system directory
(
system32
)
5. The Windows 16-bit system directory (
system
)
6. The
Windows
directory
7. The directories that are listed in the PATH
environment variable
MAXScript stops searching when it finds the first
occurrence of
startup. ms
.
MAXScript then recursively scans the Star tup
Scripts directory (defined on the Configure
System Paths dialog) and any nested directories
for
.ms
,
.mse
,and
.mzp
scr ipt files and loads
them. In this pass, any script files with the name
startup. ms
are ignored. You can prevent a nested
directory from being scanned by placing its name
in parentheses, for example "(old-versions)",
allowing you to enable and disable scripts in handy
directory-based groupings.
If you specify a scr ipt to run in the com mand
line (-U MA XS cri p t scrip t_n ame ), the scr ipt
is executed at this point. (See the MAX Script
Reference topic “Running Scripts from the
Command Line”).