20

When reviewing the existing cameras of a scene, is there a way to quickly cycle through the views of all cameras?

J Sargent
  • 19,269
  • 9
  • 79
  • 131
kr1
  • 301
  • 2
  • 8

2 Answers2

11

You can try by binding the cameras to the markers. In the timeline, press M to add marker in specified frames. You can rename that frame by pressing Ctrl + M.

Assuming you have 2 cameras on viewport, then add two marker on timeline (adjust location of the marker diferently, ie : marker 1 : 1-20, marker 2 : 21-50). Now select the first camera, press Ctrl + 0 to set as active camera, make sure first marker selected, then in timeline press Ctrl + B to bind active camera to first marker.

Select the second marker, then set second camera as active again Ctrl + 0, hover the mouse on the timeline and press Ctrl + B.

Now, when you start the animation Alt + A, the camera should switch between first and second based on marker position.

iKlsR
  • 43,379
  • 12
  • 156
  • 189
aditia
  • 970
  • 9
  • 18
  • 1
    If you just want to switch views without changing cameras on the timeline, just use ctrl+numpad0 after selecting the camera you want to view from. – jesterKing May 23 '13 at 10:54
2

run the following script:

import bpy

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
Tom Berghuis
  • 636
  • 1
  • 9
  • 17