diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-01 02:56:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-01 03:18:17 +0300 |
commit | eb0f8317e231c4a02940d0269125a96a47e94c7e (patch) | |
tree | 03c67854c72c5a4507f22f8c2321c14b2629fccd /source/blender/editors/transform/transform_constraints.c | |
parent | ae6400cfb4cae798667eab903d9c463fdec31298 (diff) |
Cleanup: ED_view3d_win_to_delta & ED_view3d_calc_zfac usage
- Rename ED_view3d_win_to_delta `mval` argument to `xy_delta` as it
as it was misleading since this is an screen-space offset not a region
relative cursor position (typical use of the name `mval`).
Also rename the variable passed to this function which also used the
term `mval` in many places.
- Re-order the output argument of ED_view3d_win_to_delta last.
use an r_ prefix for return arguments.
- Document how the `zfac` argument is intended to be used.
- Split ED_view3d_calc_zfac into two functions as the `r_flip` argument
was only used in some special cases.
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 64ef170a13f..81b35e4539b 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -1041,8 +1041,7 @@ static void setNearestAxis3d(TransInfo *t) * and to overflow the short integers. * The formula used is a bit stupid, just a simplification of the subtraction * 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. - */ + * 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_global); zfac = len_v3(t->persinv[0]) * 2.0f / t->region->winx * zfac * 30.0f; |