Go to: Synopsis. Return value. Flags. Python examples.
saveInitialState(
selectionList
, [attribute=string], [saveall=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
saveInitialState is undoable, NOT queryable, and NOT editable.
saveInitialState saves the current state of dynamics objects as the initial state. A dynamic object is a particle shape, rigid body, rigid constraint or rigid solver. If no objects are specified, it saves the initial state for any selected objects. It returns the names of the objects for which initial state was saved.
| string |
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
attribute(atr)
|
string
|
|
||
|
||||
saveall(all)
|
boolean
|
|
||
|
||||
import maya.cmds as cmds cmds.saveInitialState( 'particle1' ) # Saves current state as initial state for particle1. cmds.saveInitialState( all=True ) # Saves current state as initial state for all dynamics objects.