Visual MAXScript

Topic: version 4 MAXScript New Features/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:

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.

Features

Note

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.

#cmdPanel

#effectsDlg

#mtlEditor

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.

Example:

rollout foo "Frabulation" width:#270

(

...

)

      ...

rf = newRolloutFloater "Frabo" 300 220

addRollout foo rf