diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-20 10:57:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-20 10:58:52 +0300 |
commit | 5a69b93f57891d73379b731b52902ee47a34046d (patch) | |
tree | 46a1c101df9008d7f350153ceb5329f6d4db30e9 | |
parent | 973afa0172a66b3d0921ec1d6fd28c6acc6afdbf (diff) |
Sculpt lasso (used shorts for no good reason)
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 25f22996050..2254bc991b6 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -290,7 +290,7 @@ typedef struct LassoMaskData { static bool is_effected_lasso(LassoMaskData *data, float co[3]) { float scr_co_f[2]; - short scr_co_s[2]; + int scr_co_s[2]; float co_final[3]; flip_v3_v3(co_final, co, data->symmpass); @@ -301,8 +301,13 @@ static bool is_effected_lasso(LassoMaskData *data, float co[3]) scr_co_s[1] = scr_co_f[1]; /* clip against screen, because lasso is limited to screen only */ - if (scr_co_s[0] < data->rect.xmin || scr_co_s[1] < data->rect.ymin || scr_co_s[0] >= data->rect.xmax || scr_co_s[1] >= data->rect.ymax) + if ((scr_co_s[0] < data->rect.xmin) || + (scr_co_s[1] < data->rect.ymin) || + (scr_co_s[0] >= data->rect.xmax) || + (scr_co_s[1] >= data->rect.ymax)) + { return false; + } scr_co_s[0] -= data->rect.xmin; scr_co_s[1] -= data->rect.ymin; |