[Bf-blender-cvs] [0bd20aa7df2] master: Fix T60328: Stereoscopy Convergence Plane broken

Dalai Felinto noreply at git.blender.org
Sat Jan 12 00:53:24 CET 2019


Commit: 0bd20aa7df2ad7710f92e00d9dc72d826f16762a
Author: Dalai Felinto
Date:   Fri Jan 11 10:47:48 2019 -0200
Branches: master
https://developer.blender.org/rB0bd20aa7df2ad7710f92e00d9dc72d826f16762a

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.

===================================================================

M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

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 */



More information about the Bf-blender-cvs mailing list