[Bf-blender-cvs] [6bd53bb] master: Fix T42313: Ruler always measures 0.0
Campbell Barton
noreply at git.blender.org
Mon Oct 20 17:42:44 CEST 2014
Commit: 6bd53bb707cbe912531f094e979ce6e5f5a97016
Author: Campbell Barton
Date: Mon Oct 20 17:06:49 2014 +0200
Branches: master
https://developer.blender.org/rB6bd53bb707cbe912531f094e979ce6e5f5a97016
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