[Bf-blender-cvs] [2e6cbd9] master: Fix T45901: Smooth-view w/ bg-image glitch

Campbell Barton noreply at git.blender.org
Wed Aug 26 02:20:47 CEST 2015


Commit: 2e6cbd9bda1221036c4ec800d6e6aea35c436965
Author: Campbell Barton
Date:   Wed Aug 26 10:12:36 2015 +1000
Branches: master
https://developer.blender.org/rB2e6cbd9bda1221036c4ec800d6e6aea35c436965

Fix T45901: Smooth-view w/ bg-image glitch

It was possible to rotate the view while the view was already moving
causing background images to show when they shouldn't.

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

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

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

diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index e111a47..49ac388 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -137,6 +137,9 @@ struct SmoothView3DStore {
 	struct SmoothView3DState org;  /* original */
 
 	bool to_camera;
+
+	/* When smooth-view is enabled, store the 'rv3d->view' here,
+	 * assign back when the view motion is completed. */
 	char org_view;
 
 	double time_allowed;
@@ -180,12 +183,12 @@ void ED_view3d_smooth_view_ex(
 	/* if smoothview runs multiple times... */
 	if (rv3d->sms == NULL) {
 		view3d_smooth_view_state_backup(&sms.org, v3d, rv3d);
-		sms.org_view = rv3d->view;
 	}
 	else {
 		sms.org = rv3d->sms->org;
-		sms.org_view = rv3d->sms->org_view;
 	}
+	sms.org_view = rv3d->view;
+
 	/* sms.to_camera = false; */  /* initizlized to zero anyway */
 
 	/* note on camera locking, this is a little confusing but works ok.




More information about the Bf-blender-cvs mailing list