MaxScript

3DS Max has a scripting language that can be used to procedurally generate models as well as create ui elements within Max. This chapter will look at MaxScript.

Accessing MaxScript

Tools related to MaxScript can be accessed through the Scripting menu

Editor

To start up the MaxScript editor (B in above diagram) , you can select it from the Scripting menu. The editor does have some basic syntax highlighting so it could be useful. Alternatively you can use your favorite non-max related editor if you wish. any source editor works. There are plugins for syntax highlighting available for sublime text (watch for version of sublime supported when you google this), visual studio code and atom

Listener and Macro Recorder

The listener is like a MaxScript shell. You can write MaxScript commands in the listener and it will execute. It is not recommended for complex scripts but really good for simple experimentation.

The listener window also houses the macro recorder window. This is the pink area at the top.

Depending on the setup it is entirely possible that the separator in the listener window is at the top and there is no pink portion visible at all. Simply drag it down to reveal this area

If you enable the macro recorder (C in the menu picture), it will record actions you take within a viewport. For example, if you draw a box object in your scene, it will record the macro to do so with all the parameters. The macro recorder is really useful to help you find things like parameter names and types.

The macro recorder can be enabled in both the MaxScript menu in the max application window as well as the Macro Recorder menu item inside the listener window.

Last updated