Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-07-15 12:22:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-07-15 12:27:45 +0300
commite68f068682e70b434ca785899100c31a0a73f656 (patch)
tree7d234b3fc520e1c4bce73ea662acdcfa4df85698 /source/blender/editors/transform/transform_snap_object.c
parent3eb7d41c671bd6035299f3a3ab7cd8e8751cc5fa (diff)
Fix T48855: Ruler thickness broken in ortho view
Don't do ray-casts from the view unless cursor coords are passed.
Diffstat (limited to 'source/blender/editors/transform/transform_snap_object.c')
-rw-r--r--source/blender/editors/transform/transform_snap_object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index 27ccaa2962d..1af20cfd172 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.