Page 1217 - Kitab3DsMax
P. 1217

Chapter 49: Automating with MAXScript
                                                 9. The script is done, so in the MAXScript Listener window, choose MacroRecorder ➪ Enable to turn
                                                    off the Macro Recorder.
                                                10. Now it’s time to try out your first MAXScript effort. Add a sphere to your scene. Make sure that
                                                    it’s selected before moving to the next step.
                                                11. In the top pane of the MAXScript Listener window, select all the text (an easy way to do so is by
                                                    pressing Ctrl+A), and then hold down the Shift key and press the Enter key to tell Max to execute
                                                    the MAXScript.
                                             In Figure 49.8, you can see the script and the sphere that has been squashed and has changed color.
                                       FIGURE 49.8
                                     Running the new squash-and-turn-purple script




























                                             The MAXScript Debugger
                                             The MAXScript Debugger, shown in Figure 49.9, is a separate window that allows you to stop the execution
                                             of a script using breaks and look at the variable’s values as the script is being run. This information provides
                                             valuable information that can help to identify bugs with your script.
                                             The MAXScript Debugger dialog box is opened using the Debugger menu command in the various
                                             MAXScript tool windows or using the MAXScript ➪ Debugger Dialog menu command on the main inter-
                                             face. The Command field at the top of the Debugger window lets you input commands directly to the
                                             debugger. The Output area displays the results. Several buttons at the bottom of the Debugger window let
                                             you control how the debugger works:



                                                                                                                      1169
   1212   1213   1214   1215   1216   1217   1218   1219   1220   1221   1222