Right-Click Menu: States

These options appear when you right-click a state entry in the hierarchy.

Most of these options apply to a single state. The exception is Render Selected States, which can apply to multiple states.

Rename
Lets you rename the state.
Collapse/Expand
Closes or opens the item you right-click, leaving any child hierarchies intact (expanded or collapsed). Appears only for parent items in the hierarchy list.
Collapse/Expand hierarchy
Closes or opens all children of the item you right-click, recursing to the limits of the hierarchy. Appears only for parent items in the hierarchy list.
Select all children
Selects all children of the state you right-clicked.
Add Sub-State
Adds a new sub-state as the child of the highlighted state. Sub-states are useful for layering different rendering passes or object settings. States can be nested any number of levels deep.

A sub-state reflects conditions set by the parent state or states in addition to its own conditions. For example, if only Light A is on in a parent state and only Light B is on in a sub-state, then rendered output from the parent state will show lighting only from Light A, while rendered output from the sub-state will show lighting from both lights.

Note: If you record different changes to the same properties for a state and its sub-state, the sub-state's property overrides its parent's when the sub-state is active or rendered.
Note: You can also nest an existing state within another by dragging the state to be nested on top of its prospective parent.
Add Scripted State
Applies a sub-state that executes one or two MAXScript scripts as part of a state. You can add as many scripted states as you like to a state.

Highlight a state, then choose Add Scripted State from the States menu. Alternatively, right-click the state and choose Add Scripted State from the context menu.

This opens the Scripted State Properties dialog with two text windows:
  • An Apply State script that is executed when the state is activated by clicking the arrow at the end of its entry.
  • A Revert State script that is executed when the script is deactivated.

For example, you could create a scripted state that adds an object to the scene when the state is activated, and then deletes the object when deactivated.

You can use any legal MAXScript commands, and each script can be as long as you like. However, if a script exceeds the bounds of its window, you need to scroll it with the keyboard (the arrow keys, Page Up and Page Down, and so on); no scroll bar is available. Other standard text-editing functions also apply, such as Copy (Ctrl+C) and Paste (Ctrl+V).

To edit the scripted state, double-click its entry in the hierarchical states list.

Clone
Creates a new state with the same properties as the state you right-clicked.
Render Selected States
Produces rendered output for highlighted states only. You can highlight multiple states before choosing this option.
Render Child States
Produces rendered output for child states of the state you right-click. See Render All States on the main States menu. Available only when right-clicking a state item in the list.
Create Template
Adds a template (preset) to the Add State Template submenu based on the highlighted state. You can then Use Add State Template at any time to add a new state based on that template. Templates persist between sessions.

For example, you could create a template that has a certain camera and lighting setup, and then deploy it as a new state at any time subsequently. However, in order to do so, the camera and lights tracked by the state need to be present in the scene.

Note: Templates do not save all the settings that states do.
Delete
Deletes the highlighted state or states. Keyboard equivalent: Delete
Refresh
Updates the hierarchy list to reflect any changes. For example, if you record a change in the active viewport, use Refresh to show the change in the recorded state.