Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-11-25 05:53:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-25 05:53:40 +0400
commita65ef6a1df8fc22105575013128eecbb071df5e4 (patch)
tree0a9e8531a56fd3c82f2fc7d91f4be65d7058b8f9 /source/blender/editors
parentc5944812d69f04b48f982402a4e5518edb398ef0 (diff)
Fix T37586: Auto-perspective was changing to perspective while orbiting
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index b49abaf55ad..c6594680217 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -992,15 +992,15 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* switch from camera view when: */
if (vod->rv3d->persp != RV3D_PERSP) {
-
- if (U.uiflag & USER_AUTOPERSP) {
+ if (vod->rv3d->persp == RV3D_CAMOB) {
+ const short lpersp = (U.uiflag & USER_AUTOPERSP) ? RV3D_PERSP : vod->rv3d->lpersp;
+ view3d_persp_switch_from_camera(vod->v3d, vod->rv3d, lpersp);
+ }
+ else if ((U.uiflag & USER_AUTOPERSP) && RV3D_VIEW_IS_AXIS(vod->rv3d->view)) {
if (!ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) {
vod->rv3d->persp = RV3D_PERSP;
}
}
- else if (vod->rv3d->persp == RV3D_CAMOB) {
- view3d_persp_switch_from_camera(vod->v3d, vod->rv3d, vod->rv3d->lpersp);
- }
ED_region_tag_redraw(vod->ar);
}
@@ -3344,20 +3344,19 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
return;
}
- if (rv3d->persp == RV3D_CAMOB && v3d->camera) {
-
- if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP;
- else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo;
+ if (U.uiflag & USER_AUTOPERSP) {
+ rv3d->persp = RV3D_VIEW_IS_AXIS(view) ? RV3D_ORTHO : perspo;
+ }
+ else if (rv3d->persp == RV3D_CAMOB) {
+ rv3d->persp = perspo;
+ }
+ if (rv3d->persp == RV3D_CAMOB && v3d->camera) {
ED_view3d_smooth_view(C, v3d, ar, v3d->camera, NULL,
rv3d->ofs, new_quat, NULL, NULL,
smooth_viewtx);
}
else {
-
- if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP;
- else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo;
-
ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
NULL, new_quat, NULL, NULL,
smooth_viewtx);