Sub topic 14
Switching Cameras with Timeline Markers
When to use camera markers
Assume you know how to create cameras, set the active scene camera, and move through the Timeline. A camera marker is a Timeline marker linked to a camera object. When playback reaches that marker's frame, Blender switches the scene to the linked camera.
This lets you create hard camera cuts without animating one camera's location or rotation. Each camera can have its own lens, framing, depth of field, and animation.
Creating a camera switch in the interface
- Create or select the first camera.
- Make it active with
Ctrl+Numpad0, or assign it as the scene camera in the Output Properties. - Move the playhead to the frame where the cut should occur.
- Add a marker with
Mwhile the mouse is over the Timeline. - Select the camera that should become active after the cut.
- Bind the selected camera to the marker. In the Timeline, use the marker menu command for binding the camera, or use the camera-marker shortcut shown by your Blender version.
- Scrub across the marker and look through the camera with
Numpad0.
The marker remains at its frame even if you later move the camera. This separates the timing of the cut from the camera's transforms.
Creating camera markers with Python
The TimelineMarker API provides a camera property. The following script expects objects named CameraA and CameraB to exist. It makes CameraA active initially and creates a cut to CameraB at frame 48.
import bpy
scene = bpy.context.scene
camera_a = bpy.data.objects["CameraA"]
camera_b = bpy.data.objects["CameraB"]
scene.camera = camera_a
# Avoid creating a duplicate marker when the script is run again.
old_marker = scene.timeline_markers.get("CutToCameraB")
if old_marker is not None:
scene.timeline_markers.remove(old_marker)
marker = scene.timeline_markers.new("CutToCameraB", frame=48)
marker.camera = camera_b
scene.frame_set(1)A marker with no camera is only a visual reference. It does not change the active camera. A camera object can also be animated, so Camera B might have different positions at different frames after the cut.
Common errors
- The cut does not happen: Check that the marker's
cameraproperty is assigned. A marker name alone has no camera-switching effect. - The wrong camera appears: Select the marker and inspect which camera is linked. Also check for another camera marker at the same or an earlier frame.
- The first shot starts incorrectly: Set the scene camera explicitly before the first camera marker, or add a marker for the opening camera at the start frame.
- The render ignores the switch: Render the animation, not a still frame outside the intended range. Confirm that the scene camera changes while scrubbing the Timeline.
- The camera view looks unchanged: Press
Numpad0to enter the active camera view. The viewport may still be in a free perspective view.
Exercise
Camera A is active at frame 1, and a marker linked to Camera B is at frame 48. Which camera is used at frame 30 and which is used at frame 48?
Show answer
Camera A is used at frame 30. Camera B becomes active at frame 48.