[Bf-blender-cvs] [c48ca50] : Fix T39112: increment snap does not work in perspective view at 0.01 scale (for scene and grid floor)

Bastien Montagne noreply at git.blender.org
Wed Mar 12 18:22:15 CET 2014


Commit: c48ca50fed2f4f5cb6ebafb9e4ea710dd14bee8a
Author: Bastien Montagne
Date:   Tue Mar 11 16:37:00 2014 +0100
https://developer.blender.org/rBc48ca50fed2f4f5cb6ebafb9e4ea710dd14bee8a

Fix T39112: increment snap does not work in perspective view at 0.01 scale (for scene and grid floor)

In case of "floor" grid (i.e. perspective views), unit_scale correction was not applied...

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

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 18f3d15..7d1b759 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3262,9 +3262,8 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
 		glEnable(GL_MULTISAMPLE_ARB);
 	}
 
-
-	/* needs to be done always, gridview is adjusted in drawgrid() now */
-	rv3d->gridview = v3d->grid;
+	/* needs to be done always, gridview is adjusted in drawgrid() now, but only for ortho views. */
+	rv3d->gridview = v3d->grid / scene->unit.scale_length;
 
 	if ((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) {
 		if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {




More information about the Bf-blender-cvs mailing list