Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

autoKeyframe [-addAttr name] [-characterOption string] [-listAttr] [-noReset] [-state boolean]

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".

Return value

intNumber of keyframes set.

In query mode, return type is based on queried flag.

Related

findKeyframe, setDrivenKeyframe, setKeyPath, setKeyframe

Flags

addAttr, characterOption, listAttr, noReset, state
Long name (short name) Argument types Properties
-addAttr(-aa) name edit
Add to the list of plugs (node.attribute) that autoKeyframe is currently considering for auto keying. This list is transient and short-lived, and is reset as soon as autoKeyframe sets the keyframe or decides that no keyframe is to be set, on completion of the next set attribute.
-characterOption(-co) string createqueryedit
Valid options are: "standard", "all". Dictates whether when auto-keying characters the auto-key works as usual or whether it keys all of the character attributes. Default is "standard".
-listAttr(-lsa) query
Returns the list of plugs (node.attribute) that autoKeyframe is currently considering for auto keying. This list is transient and short-lived, and is reset as soon as autoKeyframe sets the keyframe or decides that no keyframe is to be set, on completion of the next set attribute.
-noReset(-nr) createedit
Must be used in conjunction with the state/st flag. When noReset/nr is specified, the list of plugs to be autokeyed is not cleared when the state changes
-state(-st) boolean createqueryedit
turns on/off remembering of modified attributes

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 be used more than once in a command.

MEL examples

// Start remembering attributes that have changed
//
autoKeyframe -state on;

// For all attributes that have changed since the
// last "autoKeyframe -state on", set a keyframe
//
autoKeyframe;

// Stop remembering attributes that have changed.
// Note that Subsequent "autoKeyframe" commands
// (with no flags) will have no effect until an
// "autoKeyframe -state on" command is executed.
//
autoKeyframe -state off;

// List the plugs that will be considered to add a key on completion of the
// next set attribute.
autoKeyframe -q -listAttr

// Add to the list the plugs that will be considered to add a key on
// completion of the next set attribute.
autoKeyframe -e -addAttr myNode.myAttr

// When auto-keying, key all character attributes, not just
// those that have changed.
//
autoKeyframe -characterOption all;