Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

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.

Return value

string

Flags

attribute, saveall
Long name (short name) Argument types Properties
saveall(all) boolean create
Save the initial state for all dynamics objects in the scene.
attribute(atr) string createmultiuse
Save the initial state of the specified attribute only. This is a multi-use flag.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

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.