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>2013-03-09 15:40:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-09 15:40:42 +0400
commitabd1748e486e0948df26fb7a0cf42bce67f861ec (patch)
tree8d5510d29295a07e710971ec088dce424de6ea6e /source/blender/editors/sculpt_paint/paint_utils.c
parente2ddd832dcdd890bc7d5ca29b1d8c3ec5848c620 (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.c6
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;