diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-01-11 15:47:48 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-01-12 02:51:15 +0300 |
commit | 0bd20aa7df2ad7710f92e00d9dc72d826f16762a (patch) | |
tree | 7fef8aa650bb2577ab680de7352d0b4335f3ece8 /source/blender/editors | |
parent | 47be4e9a337931f38e7b3ef903df3592ed239b0d (diff) |
Fix T60328: Stereoscopy Convergence Plane broken
The original issue is that we were changing the camera shiftx
temporarily for the stereoscopic calculation. However we are using the
evaluated object when calculating the projection matrix.
Note: Camera framing drawing for stereo still seems to be broken.
But the viewport itself is now correct.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index a64ba5b2197..92fb64964aa 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -248,20 +248,22 @@ static void view3d_stereo3d_setup( /* update the viewport matrices with the new camera */ if (scene->r.views_format == SCE_VIEWS_FORMAT_STEREO_3D) { - Camera *data; + Camera *data, *data_eval; float viewmat[4][4]; float shiftx; data = (Camera *)v3d->camera->data; - shiftx = data->shiftx; + data_eval = (Camera *)DEG_get_evaluated_id(depsgraph, &data->id); + + shiftx = data_eval->shiftx; BLI_thread_lock(LOCK_VIEW3D); - data->shiftx = BKE_camera_multiview_shift_x(&scene->r, v3d->camera, viewname); + data_eval->shiftx = BKE_camera_multiview_shift_x(&scene->r, v3d->camera, viewname); BKE_camera_multiview_view_matrix(&scene->r, v3d->camera, is_left, viewmat); view3d_main_region_setup_view(depsgraph, scene, v3d, ar, viewmat, NULL, rect); - data->shiftx = shiftx; + data_eval->shiftx = shiftx; BLI_thread_unlock(LOCK_VIEW3D); } else { /* SCE_VIEWS_FORMAT_MULTIVIEW */ |