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>2015-08-26 08:13:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-08-26 08:13:19 +0300
commit1d34f0feede65460d564e4f0cf17f73007e102f2 (patch)
tree219b957467d9f6f0646fd5cb839131bfa840e5c3 /source/blender/editors/space_view3d
parentcc60f35a18041d7dd364cba223b46dbcbd036e43 (diff)
Smooth-view: Ignored camera-viewpoint on exit to user-view
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index dd82e66cb97..3fc415ed21b 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -3815,8 +3815,16 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
smooth_viewtx);
}
else {
+ float ofs[3], dist;
+
+ copy_v3_v3(ofs, rv3d->ofs);
+ dist = rv3d->dist;
+
+ /* so we animate _from_ the camera location */
+ ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, &rv3d->dist, NULL);
+
ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
- NULL, quat, NULL, NULL,
+ ofs, quat, &dist, NULL,
smooth_viewtx);
}