From 0128c401b9d765ac83dc243f83039a488d3505c7 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 20 Jul 2006 10:36:55 +0000 Subject: Bugfix #4741 Ancient issue; when you press keypad-0, it should assign the active camera object to a scene, but this did not happen when that camera was already assigned to the active 3d view. A rare case, causing 'error no camera' on a render. --- source/blender/src/toets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/src/toets.c') diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 15a6fe1d420..93d38ad6b34 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -259,8 +259,9 @@ void persptoetsen(unsigned short event) handle_view3d_lock(); } else if(BASACT) { + /* check both G.vd as G.scene cameras */ if(G.qual==LR_CTRLKEY) { - if(G.vd->camera != OBACT) { + if(G.vd->camera != OBACT || G.scene->camera != OBACT) { if(G.vd->camera && G.vd->camera->type==OB_CAMERA) oldcamera= G.vd->camera; @@ -268,7 +269,7 @@ void persptoetsen(unsigned short event) handle_view3d_lock(); } } - else if(G.vd->camera==0 && OBACT->type==OB_CAMERA) { + else if((G.vd->camera==NULL || G.scene->camera==NULL) && OBACT->type==OB_CAMERA) { G.vd->camera= OBACT; handle_view3d_lock(); } -- cgit v1.2.3