diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-09 15:40:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-09 15:40:42 +0400 |
commit | abd1748e486e0948df26fb7a0cf42bce67f861ec (patch) | |
tree | 8d5510d29295a07e710971ec088dce424de6ea6e /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | e2ddd832dcdd890bc7d5ca29b1d8c3ec5848c620 (diff) |
code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index dc3f310b405..6fb2361022d 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -160,12 +160,12 @@ float paint_calc_object_space_radius(ViewContext *vc, const float center[3], Object *ob = vc->obact; float delta[3], scale, loc[3]; const float mval_f[2] = {pixel_radius, 0.0f}; + float zfac; mul_v3_m4v3(loc, ob->obmat, center); - initgrabz(vc->rv3d, loc[0], loc[1], loc[2]); - - ED_view3d_win_to_delta(vc->ar, mval_f, delta); + zfac = ED_view3d_calc_zfac(vc->rv3d, loc, NULL); + ED_view3d_win_to_delta(vc->ar, mval_f, delta, zfac); scale = fabsf(mat4_to_scale(ob->obmat)); scale = (scale == 0.0f) ? 1.0f : scale; |