I have multiple cameras in a scene. What I want to do is to change which one is active. This way I can view the scene from different angles. How would I do this?
There are a few ways to set the active camera.
Key Binding: select it and press Ctrl+ Numpad 0.
From the menu:
3D Viewport Header -> View -> Cameras -> Set active object as camera.
Scene tab in the Properties Editor and pick a camera object from the list:
- Outliner (V2.90+):
You can click the green camera icon beside the camera's name in the outliner to toggle it as active for the scene.
To change the active camera during an animation you can use Markers.
- Add a marker where you want to change the active camera (M in the Timeline, or Timeline header > Add marker will add a marker to the current frame):
- Select the object which you want to set as the new active camera and the marker which you want to bind it to, then press CtrlB in the Timeline (or Timeline header > View > Bind camera to markers):
Note that markers behave like keyframes, so you will need at least two markers with cameras bound to them to have any camera switching.
To illustrate this, here is an example with
Camera.001 bound to the marker on frame
Camera bound to the marker on frame
Note: If setting the active camera is only effecting a single view, you may have Scene-lock disabled. In the 3D View header (Right hand side of layers buttons), there is a lock icon. This should normally be pushed in, unless you explicitly want to set a camera & layers only to a single view.
Another way to achieve camera switching in Blender is through the VSE or Video Sequence Editor.
- Establish multiple cameras in the scene.
- Add a scene strip to the VSE for each camera and set the active camera of the strip to each camera in the scene.
Note: If you cannot add a scene strip (because the menu is empty), just add a new scene and then you can add your original scene into the timeline.
- Add a Multicam effect strip above these scene strips and use the buttons to switch between cameras. With a VSE preview window open you will see the switching occur (but not in the 3D view)
This can be used to feed the compositor with time offset scene renders as well. For example you may want to have a repeated action from alternate angles, simply set up the switching in the VSE then drag the scene strip along the timeline.
In order to change the currently active camera, select the one you want to be active and press Ctrl0. This will also change your view to the new camera.
To change cameras mid-animation, you need to use markers. A marker can be added by hovering with your mouse over the timeline and pressing M. Next you need to bind the second camera change with that marker. You can do it by selecting the camera and pressing CtrlB.
NB: It is important to know that markers behave a bit like keyframes, so it is important to add one at the beginning of your animation and bind it to your first camera.
run the following script:
import bpy import os scene = bpy.context.scene currentcam = bpy.context.scene.camera setcam = False for ob in scene.objects: if ob.type == 'CAMERA': if ob == currentcam: setcam = True elif setcam: bpy.context.scene.camera = ob break if currentcam == bpy.context.scene.camera: for ob in scene.objects: if ob.type == 'CAMERA': bpy.context.scene.camera = ob break