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-06-13 19:09:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-13 19:09:32 +0400
commitbb61b4628039c0d3162182801666ac0df99e6165 (patch)
tree0e907f4ef885f5255b20e5382c597b96441a380d /source/blender/editors/space_view3d/view3d_fly.c
parent7d478ac0a7d5925d316371502ae642015bbfa7ae (diff)
fixes for using scaled cameras
- ED_view3d_from_m4() got incorrect rotation from scaled cameras, was noticable with smoothview transitions. - when you lock the camera to the view, any view edits would reset the cameras scale to 1. - another problem with view locking if the camera was scaled and had a parent, the parent would be transformed incorrectly. - fly mode was chaning object scale a little over time, now restore after applying scale so it never changes.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_fly.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 64dc0bef689..6bab677fb61 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -762,6 +762,10 @@ static void flyMoveCamera(bContext *C, RegionView3D *rv3d, FlyInfo *fly,
else {
float view_mat[4][4];
float size_mat[4][4];
+ float size_back[3];
+
+ /* even though we handle the size matrix, this still changes over time */
+ copy_v3_v3(size_back, v3d->camera->size);
ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist);
size_to_mat4(size_mat, v3d->camera->size);
@@ -769,6 +773,8 @@ static void flyMoveCamera(bContext *C, RegionView3D *rv3d, FlyInfo *fly,
BKE_object_apply_mat4(v3d->camera, view_mat, true, true);
+ copy_v3_v3(v3d->camera->size, size_back);
+
id_key = &v3d->camera->id;
}