pymel.core.effects.saveInitialState

saveInitialState(*args, **kwargs)

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.

Flags:

Long Name / Short Name Argument Types Properties
attribute / atr unicode ../../../_images/create.gif
  Save the initial state of the specified attribute only. This is a multi-use flag.
saveall / all bool ../../../_images/create.gif
  Save the initial state for all dynamics objects in the scene. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.saveInitialState

Example:

import pymel.core as pm

pm.saveInitialState( 'particle1' )
# Saves current state as initial state for particle1.

pm.saveInitialState( all=True )
# Saves current state as initial state for all dynamics objects.