Sub topic 1
Animation as values changing over time
Prerequisites
This chapter assumes you can move around the 3D Viewport, select and move objects, and read the Properties editor. You should know what the location, rotation, and scale transforms are. You should also know how to change an editor type and resize an area.
Animation as values over time
Animation is a property that changes its value as the frame number advances. A property is any setting, such as an object's X location. Blender stores the value at frames you choose, then calculates the values in between.
Frames, frame range, and frame rate
A frame is one still image in the sequence. The current frame appears in the Timeline. The frame range is the start frame and end frame of the animation. Set it in the Timeline header or in Output Properties under Frame Range. The frame rate is the number of frames shown per second. Set it in Output Properties under Format. The default is 24 fps, so a 2-second clip uses 48 frames.
What a keyframe is
A keyframe is a stored value of a property at one specific frame. Interpolation is the calculation Blender uses to fill the values between two keyframes. Interpolation is covered in a later chapter.
Which properties can be animated
Most numeric fields can be animated, including transforms, material values, and modifier settings. Hover over a field and look at its color:
- Yellow: the field has a keyframe on the current frame.
- Green: the field is animated, but has no keyframe on the current frame.
- Gray: the field is not animated.
Inserting, updating, and deleting keyframes
- Insert: Hover over a field and press I.
- Update: Move to a keyed frame, change the value, and press I again.
- Delete: Hover over a yellow field and press Alt+I.
The following script keys the active object's location at two frames:
import bpy
scene = bpy.context.scene
scene.frame_start = 1
scene.frame_end = 48
obj = bpy.context.active_object
obj.location = (0.0, 0.0, 0.0)
obj.keyframe_insert(data_path="location", frame=1)
obj.location = (0.0, 0.0, 2.0)
obj.keyframe_insert(data_path="location", frame=24)Exercise
You keyed an object's location at frame 10, then move to frame 10 and press Alt+I over the Z field. What happens?
Show answer
The keyframe on Z at frame 10 is deleted. The field turns green if other keyframes on Z remain, or gray if none remain.