From eb0f8317e231c4a02940d0269125a96a47e94c7e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Mar 2022 10:56:28 +1100 Subject: 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. --- source/blender/io/gpencil/intern/gpencil_io_base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/io/gpencil') diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc index 9d4311bd693..9379e72bdd9 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc @@ -158,7 +158,7 @@ void GpencilIO::create_object_list() float zdepth = 0; if (rv3d_) { if (rv3d_->is_persp) { - zdepth = ED_view3d_calc_zfac(rv3d_, object->obmat[3], nullptr); + zdepth = ED_view3d_calc_zfac(rv3d_, object->obmat[3]); } else { zdepth = -dot_v3v3(rv3d_->viewinv[2], object->obmat[3]); -- cgit v1.2.3