8
MAXScript Mini Listener 747
The MAXScript Listener window is divided
into two panes: one pink, and one white. The
pink pane is the MacroRecorder pane. When
the MacroRecorder is enabled, everything that is
recorded is displayed in the pink pane. The pink
line in the Mini Listener shows the latest entry into
the MacroRecorder pane.
The white pane is the Scripter window where you
can create scripts. The last line you type in the
whiteareaoftheListenerwillappearinthewhite
are of the Mini Listener. Use the arrow keys to
scroll the display in the Mini Listener.
You can type directly into the white area of the
Mini Listener, and the command executes in the
viewports.
Rig ht-click either of the Mini Listener lines to
open the floating MAXScript Listener window.
It will also display a list of the last 20 commands
recorded. You can choose any of these commands
and press ENTER to execute them.
For more information about the MAXScript
Listener window, as well as about creating scripts,
see the MAXScript Reference: choose Help >
MAXScript Reference.
Pr ocedur es
Ex ampl e: To create a sphere usi ng the M ini L istener :
1.
Click the tag bar at the left end of the status
bar,anddragittotherighttoexpandtheMini
Listener.
2. In the Scripter (white, lower) line, type sphere
radius: 50 and press ENTER.
A sphere appears in the viewports.
Ex ampl e: To r edo a command us ing t he M ini Li stener :
1.
Clickthetagbarattheleftsideofthestatus
bar,anddragittotherighttoexpandtheMini
Listener.
2. Right-click the Mini Listener and choo se Open
Listener Window.
3. From the MacroRecorder menu, choose Enable.
4. Using the command panel, create a sphere in
the perspective viewport.
5. Convert the sphere to an Editable Mesh.
6. Delete the sphere.
7. Make a box.
8. Right-click the MacroRecorder (pink, upper)
line and cho ose
macros.run "Modifier Stack"
"Convert_ to_Mesh"
from the l ist. The box has
been collapsed to an editable mesh.
Example: To mak e a scr ipt and add it to a toolbar:
Forthisverysimpleexample,you’llmakeascript
thatcollapsesanobjecttoaneditablemesh,and
then create a toolbar icon to run the script.
1. Right-click the Mini Listener, and choose Open
Listener Window.
2. From the MacroRecorder menu, choose Enable.
Close the listener window.
3. Create a box in the Perspective viewpor t.
4. Right-click the box and choose Convert to: >
Editable Mesh from the quad menu.
5. Left-click in the MacroRecorder line.
The MacroRecorder line goes blank because
the cursor goes to the last line.
6. Press the upper-arrow key on the keyboard to
move up t he list of recorded command scripts.
7. Click and highlight the
macros.run "Modifier
Stack" "Convert_to_Mesh"
line.
Highlight the command script as you would
highlight a line of text in a text editor by clicking
at the start of the line and dragging along the
entire length.
8. Click and drag the highlig hted script from the
Mini Listener to a toolbar.