diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 17:50:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 17:50:41 +0400 |
commit | 363bfdc46a05a5225bd4abc76b14ba2002f414af (patch) | |
tree | 5ffc73ffa68976711eebfc3770542a9df9287cd8 /source/blender/editors/sculpt_paint | |
parent | a8ef6ffd170f559a50791556160fc3d7ec6a54d8 (diff) |
use consistant arguments to ED_view3d_win_* funcs, a single float vector rather then 2 floats.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 |
2 files changed, 6 insertions, 2 deletions
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) { |