diff options
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 30 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_interpolate.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 42 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 42 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_sculpt_paint.c | 32 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_uv.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_vertex_paint.c | 32 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_weight_paint.c | 32 |
9 files changed, 125 insertions, 99 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 3e33f811225..5629e29f257 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -2050,20 +2050,35 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* We don't pass on key events, GP is used with key-modifiers - * prevents Dkey to insert drivers. */ if (ISKEYBOARD(event->type)) { - if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY, ZKEY)) { + if (ELEM(event->type, + EVT_LEFTARROWKEY, + EVT_DOWNARROWKEY, + EVT_RIGHTARROWKEY, + EVT_UPARROWKEY, + EVT_ZKEY)) { /* allow some keys: * - for frame changing [#33412] * - for undo (during sketching sessions) */ } - else if (ELEM(event->type, PAD0, PAD1, PAD2, PAD3, PAD4, PAD5, PAD6, PAD7, PAD8, PAD9)) { + else if (ELEM(event->type, + EVT_PAD0, + EVT_PAD1, + EVT_PAD2, + EVT_PAD3, + EVT_PAD4, + EVT_PAD5, + EVT_PAD6, + EVT_PAD7, + EVT_PAD8, + EVT_PAD9)) { /* allow numpad keys so that camera/view manipulations can still take place * - PAD0 in particular is really important for Grease Pencil drawing, * as animators may be working "to camera", so having this working * is essential for ensuring that they can quickly return to that view */ } - else if ((event->type == BKEY) && (event->val == KM_RELEASE)) { + else if ((event->type == EVT_BKEY) && (event->val == KM_RELEASE)) { /* Add Blank Frame * - Since this operator is non-modal, we can just call it here, and keep going... * - This operator is especially useful when animating @@ -2083,7 +2098,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) * as that would break polyline T32647. */ - if (event->val == KM_PRESS && ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) { + if (event->val == KM_PRESS && + ELEM(event->type, EVT_RETKEY, EVT_PADENTER, EVT_ESCKEY, EVT_SPACEKEY, EVT_EKEY)) { /* exit() ends the current stroke before cleaning up */ /* printf("\t\tGP - end of paint op + end of stroke\n"); */ p->status = GP_STATUS_DONE; @@ -2261,19 +2277,19 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) } /* eraser size */ else if ((p->paintmode == GP_PAINTMODE_ERASER) && - ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, PADPLUSKEY, PADMINUS)) { + ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, EVT_PADPLUSKEY, EVT_PADMINUS)) { /* just resize the brush (local version) * TODO: fix the hardcoded size jumps (set to make a visible difference) and hardcoded keys */ /* printf("\t\tGP - resize eraser\n"); */ switch (event->type) { case WHEELDOWNMOUSE: /* larger */ - case PADPLUSKEY: + case EVT_PADPLUSKEY: p->radius += 5; break; case WHEELUPMOUSE: /* smaller */ - case PADMINUS: + case EVT_PADMINUS: p->radius -= 5; if (p->radius <= 0) { diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index c928c1e933a..a7fc5a4965b 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1487,7 +1487,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event) int estate = OPERATOR_PASS_THROUGH; /* default exit state - pass through */ switch (event->type) { - case ESCKEY: + case EVT_ESCKEY: case RIGHTMOUSE: estate = OPERATOR_CANCELLED; break; diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index bd00a492035..958728c2baf 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -563,8 +563,8 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent switch (event->type) { case LEFTMOUSE: /* confirm */ - case PADENTER: - case RETKEY: { + case EVT_PADENTER: + case EVT_RETKEY: { /* return to normal cursor and header status */ ED_area_status_text(tgpi->sa, NULL); ED_workspace_status_text(C, NULL); @@ -598,7 +598,7 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent return OPERATOR_FINISHED; } - case ESCKEY: /* cancel */ + case EVT_ESCKEY: /* cancel */ case RIGHTMOUSE: { /* return to normal cursor and header status */ ED_area_status_text(tgpi->sa, NULL); diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index e7586d95d29..90076b8d91b 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2897,7 +2897,7 @@ static void gpencil_guide_event_handling(bContext *C, GP_Sculpt_Guide *guide = &p->scene->toolsettings->gp_sculpt.guide; /* Enter or exit set center point mode */ - if ((event->type == OKEY) && (event->val == KM_RELEASE)) { + if ((event->type == EVT_OKEY) && (event->val == KM_RELEASE)) { if ((p->paintmode == GP_PAINTMODE_DRAW) && guide->use_guide && (guide->reference_point != GP_GUIDE_REF_OBJECT)) { add_notifier = true; @@ -2906,12 +2906,12 @@ static void gpencil_guide_event_handling(bContext *C, } } /* Freehand mode, turn off speed guide */ - else if ((event->type == VKEY) && (event->val == KM_RELEASE)) { + else if ((event->type == EVT_VKEY) && (event->val == KM_RELEASE)) { guide->use_guide = false; add_notifier = true; } /* Alternate or flip direction */ - else if ((event->type == MKEY) && (event->val == KM_RELEASE)) { + else if ((event->type == EVT_MKEY) && (event->val == KM_RELEASE)) { if (guide->type == GP_GUIDE_CIRCULAR) { add_notifier = true; guide->type = GP_GUIDE_RADIAL; @@ -2930,7 +2930,7 @@ static void gpencil_guide_event_handling(bContext *C, } } /* Line guides */ - else if ((event->type == LKEY) && (event->val == KM_RELEASE)) { + else if ((event->type == EVT_LKEY) && (event->val == KM_RELEASE)) { add_notifier = true; guide->use_guide = true; if (event->ctrl) { @@ -2946,7 +2946,7 @@ static void gpencil_guide_event_handling(bContext *C, } } /* Point guide */ - else if ((event->type == CKEY) && (event->val == KM_RELEASE)) { + else if ((event->type == EVT_CKEY) && (event->val == KM_RELEASE)) { add_notifier = true; if (!guide->use_guide) { guide->use_guide = true; @@ -2963,7 +2963,7 @@ static void gpencil_guide_event_handling(bContext *C, } } /* Change line angle */ - else if (ELEM(event->type, JKEY, KKEY) && (event->val == KM_RELEASE)) { + else if (ELEM(event->type, EVT_JKEY, EVT_KKEY) && (event->val == KM_RELEASE)) { add_notifier = true; float angle = guide->angle; float adjust = (float)M_PI / 180.0f; @@ -2973,7 +2973,7 @@ static void gpencil_guide_event_handling(bContext *C, else if (!event->shift) { adjust *= 15.0f; } - angle += (event->type == JKEY) ? adjust : -adjust; + angle += (event->type == EVT_JKEY) ? adjust : -adjust; angle = angle_compat_rad(angle, M_PI); guide->angle = angle; } @@ -3373,7 +3373,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) switch (event->type) { /* cancel */ - case ESCKEY: + case EVT_ESCKEY: case RIGHTMOUSE: { if (ELEM(event->val, KM_RELEASE)) { drawmode = true; @@ -3404,26 +3404,36 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* We don't pass on key events, GP is used with key-modifiers - * prevents Dkey to insert drivers. */ if (ISKEYBOARD(event->type)) { - if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY)) { + if (ELEM(event->type, EVT_LEFTARROWKEY, EVT_DOWNARROWKEY, EVT_RIGHTARROWKEY, EVT_UPARROWKEY)) { /* allow some keys: * - for frame changing [#33412] * - for undo (during sketching sessions) */ } - else if (event->type == ZKEY) { + else if (event->type == EVT_ZKEY) { if (event->ctrl) { p->status = GP_STATUS_DONE; estate = OPERATOR_FINISHED; } } - else if (ELEM(event->type, PAD0, PAD1, PAD2, PAD3, PAD4, PAD5, PAD6, PAD7, PAD8, PAD9)) { + else if (ELEM(event->type, + EVT_PAD0, + EVT_PAD1, + EVT_PAD2, + EVT_PAD3, + EVT_PAD4, + EVT_PAD5, + EVT_PAD6, + EVT_PAD7, + EVT_PAD8, + EVT_PAD9)) { /* allow numpad keys so that camera/view manipulations can still take place * - PAD0 in particular is really important for Grease Pencil drawing, * as animators may be working "to camera", so having this working * is essential for ensuring that they can quickly return to that view */ } - else if ((event->type == BKEY) && (event->val == KM_RELEASE)) { + else if ((event->type == EVT_BKEY) && (event->val == KM_RELEASE)) { /* Add Blank Frame * - Since this operator is non-modal, we can just call it here, and keep going... * - This operator is especially useful when animating @@ -3443,7 +3453,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* Exit painting mode (and/or end current stroke). * */ - if (ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) { + if (ELEM(event->type, EVT_RETKEY, EVT_PADENTER, EVT_ESCKEY, EVT_SPACEKEY, EVT_EKEY)) { p->status = GP_STATUS_DONE; estate = OPERATOR_FINISHED; @@ -3591,16 +3601,16 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) } /* eraser size */ else if ((p->paintmode == GP_PAINTMODE_ERASER) && - ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, PADPLUSKEY, PADMINUS)) { + ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, EVT_PADPLUSKEY, EVT_PADMINUS)) { /* Just resize the brush (local version). */ switch (event->type) { case WHEELDOWNMOUSE: /* larger */ - case PADPLUSKEY: + case EVT_PADPLUSKEY: p->radius += 5; break; case WHEELUPMOUSE: /* smaller */ - case PADMINUS: + case EVT_PADMINUS: p->radius -= 5; if (p->radius <= 0) { diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 5cb34b1c08b..f7bfc0bab8c 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -1429,7 +1429,7 @@ static void gpencil_primitive_edit_event_handling( } break; } - case MKEY: { + case EVT_MKEY: { if ((event->val == KM_PRESS) && (tgpi->curve) && (ELEM(tgpi->orign_type, GP_STROKE_ARC))) { tgpi->flip ^= 1; gp_primitive_update_cps(tgpi); @@ -1437,7 +1437,7 @@ static void gpencil_primitive_edit_event_handling( } break; } - case EKEY: { + case EVT_EKEY: { if (tgpi->flag == IN_CURVE_EDIT && !ELEM(tgpi->type, GP_STROKE_BOX, GP_STROKE_CIRCLE)) { tgpi->flag = IN_PROGRESS; WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); @@ -1544,7 +1544,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e gpencil_primitive_update(C, op, tgpi); break; } - case ESCKEY: + case EVT_ESCKEY: case LEFTMOUSE: { zero_v2(tgpi->move); tgpi->flag = IN_CURVE_EDIT; @@ -1566,7 +1566,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e switch (event->type) { - case ESCKEY: { + case EVT_ESCKEY: { /* return to normal cursor and header status */ ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); @@ -1588,9 +1588,9 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case SPACEKEY: /* confirm */ + case EVT_SPACEKEY: /* confirm */ case MIDDLEMOUSE: - case RETKEY: + case EVT_RETKEY: case RIGHTMOUSE: { if (event->val == KM_PRESS) { tgpi->flag = IDLE; @@ -1612,7 +1612,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e gpencil_primitive_update(C, op, tgpi); break; } - case PADPLUSKEY: + case EVT_PADPLUSKEY: case WHEELUPMOUSE: { if ((event->val != KM_RELEASE)) { tgpi->tot_edges = tgpi->tot_edges + 1; @@ -1622,7 +1622,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case PADMINUS: + case EVT_PADMINUS: case WHEELDOWNMOUSE: { if ((event->val != KM_RELEASE)) { tgpi->tot_edges = tgpi->tot_edges - 1; @@ -1632,7 +1632,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case FKEY: /* brush thickness/ brush strength */ + case EVT_FKEY: /* brush thickness/ brush strength */ { if ((event->val == KM_PRESS)) { if (event->shift) { @@ -1658,7 +1658,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e gpencil_primitive_size(tgpi, false); gpencil_primitive_update(C, op, tgpi); break; - case ESCKEY: + case EVT_ESCKEY: case MIDDLEMOUSE: case LEFTMOUSE: tgpi->brush_size = 0; @@ -1681,7 +1681,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e gpencil_primitive_strength(tgpi, false); gpencil_primitive_update(C, op, tgpi); break; - case ESCKEY: + case EVT_ESCKEY: case MIDDLEMOUSE: case LEFTMOUSE: tgpi->brush_strength = 0.0f; @@ -1748,10 +1748,10 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case SPACEKEY: /* confirm */ + case EVT_SPACEKEY: /* confirm */ case MIDDLEMOUSE: - case PADENTER: - case RETKEY: { + case EVT_PADENTER: + case EVT_RETKEY: { tgpi->flag = IDLE; gpencil_primitive_interaction_end(C, op, win, tgpi); /* done! */ @@ -1769,7 +1769,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } ATTR_FALLTHROUGH; } - case ESCKEY: { + case EVT_ESCKEY: { /* return to normal cursor and header status */ ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); @@ -1780,7 +1780,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e /* canceled! */ return OPERATOR_CANCELLED; } - case PADPLUSKEY: + case EVT_PADPLUSKEY: case WHEELUPMOUSE: { if ((event->val != KM_RELEASE)) { tgpi->tot_edges = tgpi->tot_edges + 1; @@ -1792,7 +1792,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case PADMINUS: + case EVT_PADMINUS: case WHEELDOWNMOUSE: { if ((event->val != KM_RELEASE)) { tgpi->tot_edges = tgpi->tot_edges - 1; @@ -1804,7 +1804,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case GKEY: /* grab mode */ + case EVT_GKEY: /* grab mode */ { if ((event->val == KM_PRESS)) { tgpi->flag = IN_MOVE; @@ -1812,7 +1812,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case FKEY: /* brush thickness/ brush strength */ + case EVT_FKEY: /* brush thickness/ brush strength */ { if ((event->val == KM_PRESS)) { if (event->shift) { @@ -1827,7 +1827,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case CKEY: /* curve mode */ + case EVT_CKEY: /* curve mode */ { if ((event->val == KM_PRESS) && (tgpi->orign_type == GP_STROKE_CURVE)) { switch (tgpi->type) { @@ -1846,7 +1846,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e } break; } - case TABKEY: { + case EVT_TABKEY: { if (tgpi->flag == IN_CURVE_EDIT) { tgpi->flag = IN_PROGRESS; WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c index 5db331280f8..8c92d53b8e6 100644 --- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c @@ -2028,7 +2028,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even /* Abort painting if any of the usual things are tried */ case MIDDLEMOUSE: case RIGHTMOUSE: - case ESCKEY: + case EVT_ESCKEY: gpsculpt_brush_exit(C, op); return OPERATOR_FINISHED; } @@ -2050,7 +2050,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even /* Exit modal operator, based on the "standard" ops */ case RIGHTMOUSE: - case ESCKEY: + case EVT_ESCKEY: gpsculpt_brush_exit(C, op); return OPERATOR_FINISHED; @@ -2065,24 +2065,24 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even break; /* Change Frame - Allowed */ - case LEFTARROWKEY: - case RIGHTARROWKEY: - case UPARROWKEY: - case DOWNARROWKEY: + case EVT_LEFTARROWKEY: + case EVT_RIGHTARROWKEY: + case EVT_UPARROWKEY: + case EVT_DOWNARROWKEY: return OPERATOR_PASS_THROUGH; /* Camera/View Gizmo's - Allowed */ /* (See rationale in gpencil_paint.c -> gpencil_draw_modal()) */ - case PAD0: - case PAD1: - case PAD2: - case PAD3: - case PAD4: - case PAD5: - case PAD6: - case PAD7: - case PAD8: - case PAD9: + case EVT_PAD0: + case EVT_PAD1: + case EVT_PAD2: + case EVT_PAD3: + case EVT_PAD4: + case EVT_PAD5: + case EVT_PAD6: + case EVT_PAD7: + case EVT_PAD8: + case EVT_PAD9: return OPERATOR_PASS_THROUGH; /* Unhandled event */ diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c index 5e397374437..8e9d46793a9 100644 --- a/source/blender/editors/gpencil/gpencil_uv.c +++ b/source/blender/editors/gpencil/gpencil_uv.c @@ -436,7 +436,7 @@ static int gpencil_transform_fill_modal(bContext *C, wmOperator *op, const wmEve GpUvData *opdata = op->customdata; switch (event->type) { - case ESCKEY: + case EVT_ESCKEY: case RIGHTMOUSE: { gpencil_transform_fill_cancel(C, op); return OPERATOR_CANCELLED; @@ -455,8 +455,8 @@ static int gpencil_transform_fill_modal(bContext *C, wmOperator *op, const wmEve break; } case LEFTMOUSE: - case PADENTER: - case RETKEY: { + case EVT_PADENTER: + case EVT_RETKEY: { if ((event->val == KM_PRESS) || ((event->val == KM_RELEASE) && RNA_boolean_get(op->ptr, "release_confirm"))) { gpencil_uv_transform_calc(C, op); diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c index 45dc22bafba..0c3b29ab1ea 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c @@ -1308,7 +1308,7 @@ static int gp_vertexpaint_brush_modal(bContext *C, wmOperator *op, const wmEvent /* Abort painting if any of the usual things are tried */ case MIDDLEMOUSE: case RIGHTMOUSE: - case ESCKEY: + case EVT_ESCKEY: gp_vertexpaint_brush_exit(C, op); return OPERATOR_FINISHED; } @@ -1329,7 +1329,7 @@ static int gp_vertexpaint_brush_modal(bContext *C, wmOperator *op, const wmEvent /* Exit modal operator, based on the "standard" ops */ case RIGHTMOUSE: - case ESCKEY: + case EVT_ESCKEY: gp_vertexpaint_brush_exit(C, op); return OPERATOR_FINISHED; @@ -1344,24 +1344,24 @@ static int gp_vertexpaint_brush_modal(bContext *C, wmOperator *op, const wmEvent break; /* Change Frame - Allowed */ - case LEFTARROWKEY: - case RIGHTARROWKEY: - case UPARROWKEY: - case DOWNARROWKEY: + case EVT_LEFTARROWKEY: + case EVT_RIGHTARROWKEY: + case EVT_UPARROWKEY: + case EVT_DOWNARROWKEY: return OPERATOR_PASS_THROUGH; /* Camera/View Gizmo's - Allowed */ /* (See rationale in gpencil_paint.c -> gpencil_draw_modal()) */ - case PAD0: - case PAD1: - case PAD2: - case PAD3: - case PAD4: - case PAD5: - case PAD6: - case PAD7: - case PAD8: - case PAD9: + case EVT_PAD0: + case EVT_PAD1: + case EVT_PAD2: + case EVT_PAD3: + case EVT_PAD4: + case EVT_PAD5: + case EVT_PAD6: + case EVT_PAD7: + case EVT_PAD8: + case EVT_PAD9: return OPERATOR_PASS_THROUGH; /* Unhandled event */ diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c index c519129cdf7..0dace9f004b 100644 --- a/source/blender/editors/gpencil/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil/gpencil_weight_paint.c @@ -798,7 +798,7 @@ static int gp_weightpaint_brush_modal(bContext *C, wmOperator *op, const wmEvent /* Abort painting if any of the usual things are tried */ case MIDDLEMOUSE: case RIGHTMOUSE: - case ESCKEY: + case EVT_ESCKEY: gp_weightpaint_brush_exit(C, op); return OPERATOR_FINISHED; } @@ -819,7 +819,7 @@ static int gp_weightpaint_brush_modal(bContext *C, wmOperator *op, const wmEvent /* Exit modal operator, based on the "standard" ops */ case RIGHTMOUSE: - case ESCKEY: + case EVT_ESCKEY: gp_weightpaint_brush_exit(C, op); return OPERATOR_FINISHED; @@ -834,24 +834,24 @@ static int gp_weightpaint_brush_modal(bContext *C, wmOperator *op, const wmEvent break; /* Change Frame - Allowed */ - case LEFTARROWKEY: - case RIGHTARROWKEY: - case UPARROWKEY: - case DOWNARROWKEY: + case EVT_LEFTARROWKEY: + case EVT_RIGHTARROWKEY: + case EVT_UPARROWKEY: + case EVT_DOWNARROWKEY: return OPERATOR_PASS_THROUGH; /* Camera/View Gizmo's - Allowed */ /* (See rationale in gpencil_paint.c -> gpencil_draw_modal()) */ - case PAD0: - case PAD1: - case PAD2: - case PAD3: - case PAD4: - case PAD5: - case PAD6: - case PAD7: - case PAD8: - case PAD9: + case EVT_PAD0: + case EVT_PAD1: + case EVT_PAD2: + case EVT_PAD3: + case EVT_PAD4: + case EVT_PAD5: + case EVT_PAD6: + case EVT_PAD7: + case EVT_PAD8: + case EVT_PAD9: return OPERATOR_PASS_THROUGH; /* Unhandled event */ |