Move the camera view like the 3d Viewport

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Sun Nov 16, 2008 10:13 pm

Move the camera view like the 3d Viewport

Post by banafaen »

Instead of grabbing the camera from other viewports, use "camera fly mode" or using ctrl alt num 0, would it be possible to move the camera just like in 3d viewport? Like MMB rotate, shift mmb pan etc.

Posts: 0
Joined: Sun Jan 15, 2006 1:40 am

Post by slow67 »

blender has no way to do this at the moment.
you can assign a script to a specific viewport and have that
abbility in that viewport.

copy this script below and paste it into the text editor in blender.
Then in the 'Panels' window choose 'Script' and toggle 'Enable Script Links'.
In the ViewPort you wish to control the camera choose,
View -> Space Handler Scripts -> Scriptname.

After that as long as the camera is selected, in that viewport you should
have regular viewport controls for the camera.

Code: Select all

import Blender
scn = Blender.Scene.GetCurrent()
cam = Blender.Object.Get('Camera')
if cam in scn.objects.selected:
	if Blender.Draw.MIDDLEMOUSE:
		VM = Blender.Window.GetViewMatrix()

Posts: 0
Joined: Sun Nov 16, 2008 10:13 pm

Post by banafaen »

thx m8. Works very well :D

Posts: 0
Joined: Tue May 06, 2008 6:08 pm
Location: GSP

Post by jamin3d »

Cool script. Alternatively, you can select the camera you want to move, then adjust your viewport until it is where you want the camera to be, then press CTRL+ALT+NUMPAD 0 (or choose "View, Align View, Align Active Camera to View" from the 3D View header).


Posts: 0
Joined: Mon May 27, 2013 3:39 pm

Post by Cenda »

This is old topic, but when somebody ask same question:

Press N for show side panel, under View check option Lock Camera to View

Post Reply