diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-10 17:13:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-10 17:14:29 +0300 |
commit | 549d4a55ab0c7a313150ac953cecd873bf5022a7 (patch) | |
tree | dd2325ccd84465bf138a3fc48b6ce5ab888b47db | |
parent | 5c3857b3051ff9f40e606ae2fc59f68a1747f1d7 (diff) |
Fix transform nearest axis check
Was mixing up global/local coords
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 5621eede543..08bd36fe95c 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -979,7 +979,7 @@ static void setNearestAxis3d(TransInfo *t) * of two 2D points 30 pixels apart (that's the last factor in the formula) after * projecting them with ED_view3d_win_to_delta and then get the length of that vector. */ - zfac = mul_project_m4_v3_zfac(t->persmat, t->center); + zfac = mul_project_m4_v3_zfac(t->persmat, t->center_global); zfac = len_v3(t->persinv[0]) * 2.0f / t->ar->winx * zfac * 30.0f; for (i = 0; i < 3; i++) { |