Visual MAXScript


Visual MAXScript is a direct-manipulation, multithreaded, forms-based editor that you can use to layout and edit MAXScript rollouts. Rollout scripts can be created from scratch in the forms editor, or use it to interactively edit and add to an existing rollout definition in a script editor window.

The layout editor can be accessed in two ways:

When accessed as a Utility through the Utility command panel, the layout editor operates in a "standalone" mode. Any forms created can either be exported as separate script files containing the rollout definition script or saved in a special .vms binary layout file that can be opened again by the Visual MAXScript utility. When used in this mode, any script files exported can be opened in script editor windows for further editing in MAXScript or merging with other script files.

When accessed through the new script editor Edit menu items, the layout editor is designed for application to rollout definition sections in the active script editor. The "New Rollout" menu item is used to create a rollout definition from scratch. You place the cursor in the edit window where you want the newly-generated rollout code to be inserted and choose Edit > New Rollout. This opens the editor on a blank form to which you can add and arrange and edit rollout items. Choosing File>Save or hitting the Save icon in the layout editor window will cause the script for the rollout to be inserted at that point in the editor window. Subsequent edits and saves while the layout editor is still open cause that inserted code to be updated.

The "Edit Rollout" item (hotkey F2), is used to edit an existing rollout definition in the active script editor. You place the cursor anywhere inside a rollout or utility definition, choose Edit>Edit Rollout (F2), and the layout editor is opened showing that rollout. You can edit and add to the rollout in the layout editor and when you choose File>Save or click the Save icon in the layout editor, the original definition is replaced with new code corresponding to the edited rollout. Subsequent changes and saves while the layout editor is still open cause that code to be updated each time.



An extreme example of this is the group ( ) construct which is used to nest a set of items in a group box. Nested group ( ) constructs are removed completely by the layout editor and replaced with new groupBox UI items that define an explicitly-sized box around the original items. You can edit and add and nest groupBoxes as needed in the editor.

For command panel rollouts and other scripted plug-ins, there are now symbolic constants provided that produce the correct width automatically. These are:




So, to set up the rollout for a scripted material, you'd add a width: parameter to the rollout header like this:

rollout foo "Frabulation" width:#mtlEditor



For rollouts that will appear in a rolloutFloater, you should set the rollout width: equal to the floater window width minus 30.


rollout foo "Frabulation" width:#270





rf = newRolloutFloater "Frabo" 300 220

addRollout foo rf