diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 8 |
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 29e06eee586..cde24cd2c25 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -384,10 +384,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, |