The MAXScript Macro Recorder captures many of the actions performed by the user, and generates the MAXScript commands that correspond to those actions.
Output from Macro Recorder is displayed in the pink Macro Recorder pane of the MAXScript Listener window:
Several filtering options are available that control what types of user actions are recorded, whether the generated MAXScript commands contain explicit object references or are selection-relative, and whether the generated MAXScript commands contain explicit or relative transforms and coordinates.
These options are set using the MacroRecorder menu in the Listener window:
The default option settings are specified in the MAXScript page of the 3ds Max Preferences dialog, as described in the MAXScript Preferences Settings topic in the 3ds Max User Reference.
These settings can also be changed or set by editing the [MAXScript] section of the 3dsmax.ini file.
While many areas in 3ds Max generate Macro Recorder output, there are also many areas that do not.
In general, most of the buttons on the 3ds Max menu bar, toolbars, status bar, Create panel, and Modify panel will generate Macro Recorder output.
If the button invokes a secondary dialog, changing setting or performing actions in the secondary dialog typically will not generate Macro Recorder output.
In the Create and Modify panels, Macro Recorder output will be generated if the object or modifier can be created by MAXScript.
In some cases, the plug-in implementing an object or modifier has not been updated to support Macro Recorder, so that object or modifier will not generate Macro Recorder output.
MAXScript supports text drag-and-drop onto toolbars to create Macro Script buttons.
You can select and drag text from any text window, such as Listener window panes or Editor windows, onto any visible toolbar.
The cursor changes to an arrow with a + sign when it is OK to drop the text.
If you drop it, a Macro Script button is added to the toolbar with the dropped text as the body of the Macro Script.
The classic case here would be to drag text from the Macro Recorder pane onto a toolbar to make a button that does the sequence of events just recorded. For more information, see Defining Macro Scripts.
The following Macro Recorder menu commands are available in the Listener:
Specifies whether to use explicit scene object names or the selection set token in the generated commands if only one object is selected.
If more than one object is selected, the selection set token is always used.
FOR EXAMPLE, |
if Explicit Scene Object Names is enabled, a typical generated command would be: |
If Selection-Relative Scene Object Names is enabled, a typical generated command would be: |
By using Selection-Relative Scene Object Names, you can apply the recorded script to a different selection, thereby making it somewhat general.
Use Explicit Scene Object Names if you want the script to always work on the same objects regardless of the current scene selection.
Specifies whether to use absolute or relative transform commands in the generated commands.
When the Absolute Transform Assignments option is selected, absolute transform assignments are output only if a single object is transformed.
If multiple objects are selected, relative transform operations are output.
Specifies whether to use explicit sub-object identifiers or the sub-object selection set property in the generated commands.
FOR EXAMPLE, |
if Explicit Sub-object Sets is enabled, a typical generated command would be: |
If Selection-Relative Sub-object Sets is enabled, a typical generated command would be: |
By using Selection-Relative Sub-object Sets, you can apply the recorded script to a different selection, thereby making it somewhat general. Use Explicit Sub-object Sets if you want the script to always work on the same sub-objects regardless of the current sub-object selection.
When a scripted rollout performs parameter block value changes from its event handlers, the Macro Recorder is disabled automatically.
A special MAXScript context was introduced in 3ds Max 2013 to re-enable the Macro Recorder output explicitly in scripted rollouts' event handlers.