MAXScript Preferences Settings

Customize menu > Preferences > Preference Settings dialog > MAXScript tab

On the MAXScript panel of the Preference Settings dialog, you set MAXScript and Macro Recorder preferences, enable or disable auto-start and auto-loading of scripts, set the initial heap size, change font style and size used in the MAXScript editor, and manage all the settings for the Macro Recorder.

You can also change these settings by editing the [MAXScript] section of the gmax.ini file.

Note: Two paths to support auto-startup scripts are in the gmax Configure Paths dialog: ..\scripts and ..\scripts\startup. These default directories can be changed in Customize menu > Configure Paths > Configure Paths dialog > General panel, if you would prefer to start scripts from a different directory.

Choose Help > MAXScript Reference for details on MAXScript.

Interface

Startup group

You can start scripts automatically in two ways. You can create a file named startup.ms that contains your startup code. MAXScript searches for this file in the scripts directory first, then the gmax root directory, and finally the directories specified in the Windows PATH environment variable. MAXScript stops searching after it finds the first occurrence of startup.ms.

You can also place the script files you want auto-loaded into the \startup directory inside the \scripts directory. MAXScript loads any script file with the file name extension .ms or any encrypted script file with file name extension .mse.

If you have both a startup.ms file and auto-load files in the \startup directory, MAXScript always loads startup.ms first.

Auto Start MAXScript: Starts MAXScript when gmax starts.

Load Startup Scripts: Loads scripts automatically when gmax starts.

Load/Save Scene Scripts: Enables Scene Script loading and saving.

Load/Save Persistent Globals: Enables load and save Persistent Globals.

MAXScript supports a limited form of variables. You declare that a particular global is persistent and the value it contains is always saved to and restored from scene files as they are opened and closed. In this way you can, for example, keep direct references to objects in the scene in variables. Those references will move across scene save and reload.

Load Controller Scripts: Loads controller scripts.

MAXScript Windows group

Font: Choose a font for the MAXScript editor

Font size: Choose a font size for the MAXScript editor.

Auto Open Listener On Output: Opens the listener upon output.

Memory group

Initial Heap Allocation (Mbytes): Sets the initial heap allocation.

MAXScript carves its own working memory (called a heap) out of the memory that the software allocates. You can add to the heap at any time by increasing the value here.

Macro Recorder Group

Enable Macro Recorder: Enables the Macro Recorder.

gmax starts with the macro recorder disabled and a minimized Macro-Recorder pane in the MAXScript listener window.

You can also enable the Marcro Recorder by turning on MAXScript > Macro Recorder or by turning on Enable in the Macro Recorder menu on the MAXScript Listener toolbar.

This state is stored in the gmax.ini file. Turning it on once keeps it enabled across restarts of the program.

Code Filters group

Command Panel Switchings: Displays command panel switchings in the code.

Tool Selections: Displays tool selection in the code.

Menu Item Selections: Displays menu selection in the code.

Code Generation group

The Code Generation parameters refer to whether or not the script emitted is made selection-relative, if possible, or if it contains object references. By making the script selection-relative, you can apply the recorded script to a different selection, thereby making it more general. Absolute mode always works on the same objects regardless of the current selection.

Explicit Scene Object Names: Uses scene object names in the code.

Selection-relative Scene Object Names: Makes Scene Object Names relative in the code. Default=on.

Explicit Sub-object Sets: Uses explicit sub-object sets in the code.

Selection-relative Sub-object Sets: Uses selection relative sub-object sets in the code. Default=on.

Absolute Transform Assignments: Uses absolute transforms in the code.

Relative Transform Operations: Uses selection relative transform operations in the code.