MAXScript provides a set of classes and functions and some special syntax to allow you to construct custom rollouts that can be incorporated into the existing 3ds Max user interface. You typically use custom rollouts to provide a point-and-click interface to a tool that you have written or want to write in MAXScript, so users of your tool don't have to work with it at the script level.
There are several places in the 3ds Max user interface where you can install scripted rollouts:
In the Utilities panel.Use the utility
definition construct in MAXScript to define and install scripted utilities. Once installed, they appear in the Utilities list at the bottom of the MAXScript rollout. If the user selects a utility in this list, its rollout(s) appear below the MAXScript rollout and functions just like a plug-in utility. This was the original way of creating scripted utilities when MAXScript was first introduced in 3ds Max 2. The main benefit of using a scripted utility is that it can be created very fast and does not require much management code to add rollouts and perform operations onto the scene so it is a good way to start into scripting. The main drawback is that the Utilities rollout is narrow and rather hidden and cannot be open at the same time as the Create and Modify tabs of the Command Panel.
In special modeless rollout floater windows that you can create with the newRolloutFloater()
function. These windows appear on the desktop and function in a way similar to the Material Editor and the Selection floater in 3ds Max. You can click to alternate between them and the main 3ds Max user interface. You create individual rollout(s) for these windows using the rollout definition construct in MAXScript and install them in a rollout floater window using the addRollout()
function.
In floating scripted Dialogs. Dialogs are not a holder for rollouts but a special display form of an existing rollout. They can be created out of a rollout using the createDialog()
function.
In scripted plugins. Scripted plugins can contain one or more rollouts which will be displayed inside the Command Panel's Create and Modify tabs and can be linked to Parameter Blocks for automatic animation track management.
In Custom Attributes added to scene objects or modifiers. Custom Attributes are a special form of a Parameter Block that can be attached to other objects.
Choosing which place is best for your scripted rollouts depends on a number of factors. It is best to keep them in the Utilities panel if possible, as that maximizes the use of the screen and is consistent with the 3ds Max user interface conventions. However sometimes it is useful to have them in a modeless window if the user of your tool needs to move between the various command panels while using the tool. In some cases, you might want to provide a "float me" button on a scripted Utility rollout, similar to the Color Clipboard utility, so the user can choose to display the rollouts in a rollout floater window or in the Utilities panel.