8
826 Chapter 21: User Interface
V isual MAXScript Utility (See
MA XS cr i pt R ef erence)
Utilities panel > Utilities rollout > More button > Visual
MAXScript
Visual MAXScript is a powerful interface to
the 3ds Max scripting language, maki ng the
MAXScript feature easier to learn and use. With
Visual MAXScript, you can quickly create UI
elements and layouts for scripting.
For detailed information about Visual MAXScript,
open the
MAXScript Reference
,availablefrom
Help menu > MAXScript Reference.
MAXScript Debugger Dialog
MAXScript menu > Debugger Dialog
MAXScript Listener > Debugger m enu > Debugger Dialog
MAXScript Editor > Debugger menu > Debugger D ialog
The MAXScr ipt debugger implements the first
half of a script development and debugging
environment. It allows the main thread of 3ds Max
to be suspended, the values of global and local
variables to be examined and altered while the
thread is not running, MAXScript commands
to be executed from a command line, and the
execution to be suspended using method calls
from inside the MAXS cript code. The debugger
also lets you stop or cont inue the execution of the
suspended code.
For detailed information about the MAXScript
debugger, consult the MAXScript R eference,
available from Help menu > MAXScript Reference.
R unning Scr ipts fr om the
Command Line
3ds Max al lows you to enter MA XScript
commands directly on the command line. When
you launch 3ds Max from a DOS command line,
you can have it run a specified launch script.
This can be useful for tasks such as unattended
batch-rendering. This capability uses the existing
-U command line switch that names a utility to be
run when 3ds Max is started. The -U switch allows
an optional extra argument which, for MAXScript,
istakentobethenameofthelaunchscripttorun.
The case (capitalizat ion) of MAXScript must be as
showninthefollowingexample(enteredafteryou
CD to the program directory):
See the online
User Reference
to view this code
sample.
This example command line would launch
the 3ds Max executable in
c:\Prog ram
Files\Autodesk\3dsmax8\
,startMAXScript,and
then have it run the launch script
rendercams.ms
.
The following example launch script loads two
scenes, renders f rames from each of the cameras
in them, and then quits 3ds Max:
See the online
User Reference
to view this code
sample.
ThisexamplemakesuseofthequitMax()method
to exit 3ds Max when the script is finished.
Launchscriptsneednotbebatchscriptsasinthis
example, but may b e used to condition 3ds Max
for interactive use, for example by loading a scene
file and setting some user-interface options.
The normal st artup scripts,
startup. ms
and those
in the
\scripts\startup
directory, are run before the
launch script. It is also possible to install scripts
into indiv idual scene files that run automatically
when that scene is open or closed or at certain
other events.