From 363bfdc46a05a5225bd4abc76b14ba2002f414af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 20 May 2011 13:50:41 +0000 Subject: use consistant arguments to ED_view3d_win_* funcs, a single float vector rather then 2 floats. --- source/blender/editors/sculpt_paint/paint_utils.c | 6 +++++- source/blender/editors/sculpt_paint/sculpt.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 86b946f6ee3..aa84b8f2bb4 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -58,11 +58,15 @@ float paint_calc_object_space_radius(ViewContext *vc, float center[3], { Object *ob = vc->obact; float delta[3], scale, loc[3]; + float mval_f[2]; mul_v3_m4v3(loc, ob->obmat, center); initgrabz(vc->rv3d, loc[0], loc[1], loc[2]); - ED_view3d_win_to_delta(vc->ar, pixel_radius, 0, delta); + + mval_f[0]= pixel_radius; + mval_f[1]= 0.0f; + ED_view3d_win_to_delta(vc->ar, mval_f, delta); scale= fabsf(mat4_to_scale(ob->obmat)); scale= (scale == 0.0f)? 1.0f: scale; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 7b09736ca95..fa9f2fd340e 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2994,7 +2994,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) cache->orig_grab_location[1], cache->orig_grab_location[2]); - ED_view3d_win_to_delta(cache->vc->ar, cache->mouse[0], cache->mouse[1], grab_location); + ED_view3d_win_to_delta(cache->vc->ar, cache->mouse, grab_location); /* compute delta to move verts by */ if(!cache->first_time) { -- cgit v1.2.3