Go to: Synopsis. Return value. Related. Flags. Python examples.
autoKeyframe([characterOption=string], [noReset=boolean], [state=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
autoKeyframe is undoable, queryable, and editable.
With no flags, this command will set keyframes on all attributes that have been modified since an "autoKeyframe -state on" command was issued. To stop keeping track of modified attributes, use "autoKeyframe -state off"autoKeyframe does not create new animation curves. An attribute must have already been keyframed (with the setKeyframe command) for autoKeyframe to add new keyframes for modified attributes.
You can also query the current state of autoKeyframing with "autoKeyframe -query -state".
int | Number of keyframes set. |
In query mode, return type is based on queried flag.
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
characterOption(co)
|
string
|
![]() ![]() ![]() |
||
|
||||
noReset(nr)
|
boolean
|
![]() ![]() |
||
|
||||
state(st)
|
boolean
|
![]() ![]() ![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # Start remembering attributes that have changed # cmds.autoKeyframe( state=True ) # Set a keyframe for all attributes that have changed # since the last "autoKeyframe( state=True ) # cmds.autoKeyframe() # Stop remembering attributes that have changed. # Note that Subsequent "autoKeyframe" commands # (with no flags) will have no effect until an # autoKeyframe( state=True ) command is executed. # cmds.autoKeyframe( state=False ) # When auto-keying, key all character attributes, not just # those that have changed. # cmds.autoKeyframe( characterOption="all" )