Fix T38784: smoothview using perspective transition with ortho camera

This commit is contained in:
Campbell Barton 2014-02-25 00:57:10 +11:00
parent 1130c53cdb
commit dde6642dde
Notes: blender-bot 2023-02-14 11:08:35 +01:00
Referenced by issue #38784, Viewport needlessly jumping to perspective view
1 changed files with 5 additions and 1 deletions

View File

@ -265,7 +265,11 @@ void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcam
/* ensure it shows correct */
if (sms.to_camera) {
rv3d->persp = RV3D_PERSP;
/* use ortho if we move from an ortho view to an ortho camera */
rv3d->persp = (((rv3d->is_persp == false) &&
(camera->type == OB_CAMERA) &&
(((Camera *)camera->data)->type == CAM_ORTHO)) ?
RV3D_ORTHO : RV3D_PERSP);
}
rv3d->rflag |= RV3D_NAVIGATING;