Page 1237 - Kitab3DsMax
P. 1237
Chapter 49: Automating with MAXScript
The Event Handlers panel lists all the available events that can be associated with the selected element.
Clicking the check box to the left of these events can enable the events. For a button element, you can
enable the pressed event. With this event enabled, the code includes a function where you can define what
happens when this event is fired.
The menus and the main toolbar
At the top of the interface are some menu options and a main toolbar. The File menu also lets you create a
new layout (Ctrl+N), save layouts to a file (Ctrl+S), and open saved layouts (Ctrl+O). The Edit menu allows
you to cut (Ctrl+X), copy (Ctrl+C), and paste (Ctrl+V) form elements. You can find these same features as
buttons on the top toolbar.
The Layout menu includes options for aligning elements left (Ctrl+left arrow), right (Ctrl+right arrow), top
(Ctrl+up arrow), bottom (Ctrl+down arrow), vertical center (F9), and horizontal center (Shift+F9); to space
elements evenly across (Alt+right arrow) or down (Alt+up arrow); make elements the same size by width,
height, or both; center vertically (Ctrl+F9) or horizontally (Ctrl+Shift+F9) in the dialog box; and flip. You
can use the Layout ➪ Guide Settings menu command to specify grid snapping and spacing. Grids are
enabled using the Toggle Grid/Snap button on the right end of the main toolbar.
You can also access these commands using a right-click pop-up menu when clicking on the left pane.
Toolbar elements
The toolbar along the bottom of the window contains the form elements that you can drop on the form.
These buttons and elements include those shown in Table 49.2.
TABLE 49.2
Visual MAXScript Form Elements
Button Element What It Does
Bitmap Lets you add bitmap images to a rollout
Button Adds a simple button
Map Button Adds a mapping button that opens the Material/Map Browser
Material Button Adds a material button that also opens the Material/Map Browser
Pick Button Adds a button that lets you pick an object in a viewport
Check Button Adds a button that can be toggled on and off
Color Picker Adds a color swatch that opens the Color Picker dialog box when clicked
Combo Box Adds a list with several items
(continued)
1189