[Bf-blender-cvs] [e68f068] master: Fix T48855: Ruler thickness broken in ortho view

Campbell Barton noreply at git.blender.org
Fri Jul 15 11:24:58 CEST 2016


Commit: e68f068682e70b434ca785899100c31a0a73f656
Author: Campbell Barton
Date:   Fri Jul 15 19:22:00 2016 +1000
Branches: master
https://developer.blender.org/rBe68f068682e70b434ca785899100c31a0a73f656

Fix T48855: Ruler thickness broken in ortho view

Don't do ray-casts from the view unless cursor coords are passed.

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

M	source/blender/editors/transform/transform_snap_object.c

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

diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index 27ccaa2..1af20cf 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -1733,7 +1733,7 @@ static bool snapObject(
         ListBase *r_hit_list)
 {
 	const enum eViewProj view_proj =
-	        (sctx->use_v3d == false) ? VIEW_PROJ_NONE :
+	        ((sctx->use_v3d == false) || (mval == NULL)) ? VIEW_PROJ_NONE :
 	        (((RegionView3D *)sctx->v3d_data.ar->regiondata)->is_persp ? VIEW_PROJ_PERSP : VIEW_PROJ_ORTHO);
 
 	const ARegion *ar = sctx->v3d_data.ar;
@@ -1829,6 +1829,7 @@ static bool snapObject(
  *
  * \param use_object_edit_cage: Uses the coordinates of BMesh (if any) to do the snapping.
  * \param mval: Mouse coords.
+ * When NULL, ray-casting is handled without any projection matrix correction.
  * \param ray_origin: ray_start before being moved toward the ray_normal at the distance from vew3d clip_min.
  * \param ray_start: ray_origin moved for the start clipping plane (clip_min).
  * \param ray_normal: Unit length direction of the ray.




More information about the Bf-blender-cvs mailing list