[Bf-blender-cvs] [f01a811] blender-v2.72-release: Fix T42313: Ruler always measures 0.0

Campbell Barton noreply at git.blender.org
Tue Oct 21 12:14:50 CEST 2014


Commit: f01a81109374d88d79acdb5ce40f40ef15a8e00f
Author: Campbell Barton
Date:   Mon Oct 20 17:06:49 2014 +0200
Branches: blender-v2.72-release
https://developer.blender.org/rBf01a81109374d88d79acdb5ce40f40ef15a8e00f

Fix T42313: Ruler always measures 0.0

Passing 'ar' to snapObjectsRayEx would apply a ray-offset.

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

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

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

diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index 9d0a70e..652f44e 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -122,12 +122,10 @@ static bool ED_view3d_snap_ray(bContext *C, float r_co[3],
 	bool ret;
 
 	Scene *scene = CTX_data_scene(C);
-	View3D *v3d = CTX_wm_view3d(C);
-	ARegion *ar = CTX_wm_region(C);
 	struct Object *obedit = CTX_data_edit_object(C);
 
 	/* try snap edge, then face if it fails */
-	ret = snapObjectsRayEx(scene, NULL, v3d, ar, obedit, SCE_SNAP_MODE_FACE,
+	ret = snapObjectsRayEx(scene, NULL, NULL, NULL, obedit, SCE_SNAP_MODE_FACE,
 	                       NULL, NULL,
 	                       ray_start, ray_normal, &ray_dist,
 	                       NULL, &dist_px, r_co, r_no_dummy, SNAP_ALL);




More information about the Bf-blender-cvs mailing list