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:
authorJacques Lucke <jacques@blender.org>2020-11-09 13:49:44 +0300
committerJacques Lucke <jacques@blender.org>2020-11-09 13:49:44 +0300
commit5837ffc143e6fff055ab159335f6f605f0418b34 (patch)
tree6abcbae1668d43dcb033d87d46f24dd87be97301 /source/blender/editors/sculpt_paint/paint_mask.c
parentad85256e71081016fe7b4009f8a0c0cd7e18dafe (diff)
parent29693c7b070a05ffe8789ecdce34852fd0e31ecf (diff)
Merge branch 'blender-v2.91-release' into master
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_mask.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index f29a84a6eb7..ad7b29ae33a 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -400,10 +400,10 @@ static SculptGestureContext *sculpt_gesture_init_from_lasso(bContext *C, wmOpera
ED_view3d_ob_project_mat_get(
sgcontext->vc.rv3d, sgcontext->vc.obact, sgcontext->lasso.projviewobjmat);
BLI_lasso_boundbox(&sgcontext->lasso.boundbox, mcoords, mcoords_len);
- sgcontext->lasso.width = sgcontext->lasso.boundbox.xmax - sgcontext->lasso.boundbox.xmin;
- sgcontext->lasso.mask_px = BLI_BITMAP_NEW(
- sgcontext->lasso.width * (sgcontext->lasso.boundbox.ymax - sgcontext->lasso.boundbox.ymin),
- __func__);
+ const int lasso_width = 1 + sgcontext->lasso.boundbox.xmax - sgcontext->lasso.boundbox.xmin;
+ const int lasso_height = 1 + sgcontext->lasso.boundbox.ymax - sgcontext->lasso.boundbox.ymin;
+ sgcontext->lasso.width = lasso_width;
+ sgcontext->lasso.mask_px = BLI_BITMAP_NEW(lasso_width * lasso_height, __func__);
BLI_bitmap_draw_2d_poly_v2i_n(sgcontext->lasso.boundbox.xmin,
sgcontext->lasso.boundbox.ymin,