Sub topic 3
Selecting and editing keyframes
This chapter assumes you can insert keyframes, switch an area to the Dope Sheet, and move objects in the 3D Viewport.
Selecting and editing keyframes
In the Dope Sheet, click a keyframe to select it. Shift-click adds keys to the selection, and box select (B, or drag) selects several at once. Press A to select all keys. Then:
- G moves the selected keys in time.
- S scales their spacing around the playhead.
- Shift+D duplicates them.
- X deletes them.
Retiming and copying animation
To speed up a motion, select its keys and press S, then scale them toward the playhead. To reuse a motion, select the keys, press Ctrl+C, move the playhead, and press Ctrl+V. The pasted keys start at the current frame.
Interpolation modes
Interpolation controls how values change between two keys. Select keys and press T to choose a mode. Linear gives constant speed. Bezier eases in and out. Constant holds a value until the next key.
Keyframe types
Press R to set the type of selected keys. Types such as Keyframe, Breakdown, and Moving Hold label keys for your own workflow. They do not change the motion.
Actions and the Action Editor
An action is a named set of animation curves (F-curves) stored for an object. In the Dope Sheet, change the mode dropdown to Action Editor to see the action assigned to the active object. You can rename the action or assign a different one there.
Moving on to the Graph Editor
Press Ctrl+Tab in the Dope Sheet to switch to the Graph Editor. It shows the same keys as value curves, so you can adjust handles and easing precisely.
Keyframing with Python
The script below sets every key on the active object's action to linear interpolation. It does the same thing as selecting all keys, pressing T, and choosing Linear.
import bpy
obj = bpy.context.active_object
action = obj.animation_data.action
for fcurve in action.fcurves:
for keyframe in fcurve.keyframe_points:
keyframe.interpolation = 'LINEAR'Exercise
In the Dope Sheet, how do you move all keys of an object 10 frames later?
Show answer
Press A to select all keys, press G, type 10, and press Enter.