diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-08 06:55:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-08 06:55:03 +0300 |
commit | a6525449099e9912073479a8ca1789ba5773799d (patch) | |
tree | 8657fb4611eb1425b69df07011c4043a3156bf49 /source/blender/editors/space_view3d/view3d_edit.c | |
parent | 85b9652258f515b7d0f0133df9166c4aae6136af (diff) |
change from recent commit. when orbiting out of the camera view switch to the last used perspective.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 24e1c08617e..5af548da170 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -757,8 +757,9 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) /* switch from camera view when: */ if(vod->rv3d->persp != RV3D_PERSP) { - if (U.uiflag & USER_AUTOPERSP) + if (U.uiflag & USER_AUTOPERSP) { vod->rv3d->persp= RV3D_PERSP; + } else if(vod->rv3d->persp==RV3D_CAMOB) { /* changed since 2.4x, use the camera view */ @@ -766,15 +767,10 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) if(v3d->camera) { view3d_settings_from_ob(v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL); - if(v3d->camera->type == OB_CAMERA) { - /* overwrite setting from above with cameras perspective */ - vod->rv3d->persp= (((Camera *)v3d->camera->data)->type==CAM_ORTHO) ? RV3D_ORTHO : RV3D_PERSP; - } } - - /* if not overwritten above */ + if(vod->rv3d->persp==RV3D_CAMOB) { - vod->rv3d->persp= RV3D_PERSP; + vod->rv3d->persp= vod->rv3d->lpersp; } } ED_region_tag_redraw(vod->ar); |