diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-24 14:48:34 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-02-25 09:58:22 +0300 |
commit | ad0b3abf539bbb358f799d3f36649b5d46f222c8 (patch) | |
tree | d7aff552c5541880ca1ce2648595455418cafc56 /source/blender/editors/sculpt_paint | |
parent | e7cae5187773f41e62830be597c6f598bff0653f (diff) |
Cleanup: use flags for wmEvent modifier keys
Using flags makes checking multiple modifiers at once more convenient
and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag
which have been removed. It also simplifies checking if modifier keys
have changed.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_mask_expand.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 7c4623dd4b0..ae7570d21a1 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -1496,7 +1496,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS return OPERATOR_FINISHED; } else if (br->flag & BRUSH_LINE) { - if (event->alt) { + if (event->modifier & KM_ALT) { stroke->constrain_line = true; } else { diff --git a/source/blender/editors/sculpt_paint/sculpt_mask_expand.c b/source/blender/editors/sculpt_paint/sculpt_mask_expand.c index 72640893dea..8fc10061f83 100644 --- a/source/blender/editors/sculpt_paint/sculpt_mask_expand.c +++ b/source/blender/editors/sculpt_paint/sculpt_mask_expand.c @@ -245,7 +245,7 @@ static int sculpt_mask_expand_modal(bContext *C, wmOperator *op, const wmEvent * /* When pressing Ctrl, expand directly to the max number of iterations. This allows to flood fill * mask and face sets by connectivity directly. */ - if (event->ctrl) { + if (event->modifier & KM_CTRL) { mask_expand_update_it = ss->filter_cache->mask_update_last_it - 1; } |