diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index fdab3649b13..82c30dea91d 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1152,7 +1152,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p) /* invalidate any other point, to interpolate between * first and last contact in an imaginary line between them */ for (i = 0; i < gpd->runtime.sbuffer_used; i++) { - if ((i != first_valid) && (i != last_valid)) { + if (!ELEM(i, first_valid, last_valid)) { depth_arr[i] = FLT_MAX; } } @@ -2719,7 +2719,7 @@ static void gpencil_draw_apply(bContext *C, wmOperator *op, tGPsdata *p, Depsgra short ok = gpencil_stroke_addpoint(p, p->mval, p->pressure, p->curtime); /* handle errors while adding point */ - if ((ok == GP_STROKEADD_FULL) || (ok == GP_STROKEADD_OVERFLOW)) { + if (ELEM(ok, GP_STROKEADD_FULL, GP_STROKEADD_OVERFLOW)) { /* finish off old stroke */ gpencil_paint_strokeend(p); /* And start a new one!!! Else, projection errors! */ @@ -3232,7 +3232,7 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op) tGPsdata *p = op->customdata; /* we must check that we're still within the area that we're set up to work from - * otherwise we could crash (see bug #20586) + * otherwise we could crash (see bug T20586) */ if (CTX_wm_area(C) != p->area) { printf("\t\t\tGP - wrong area execution abort!\n"); @@ -3471,8 +3471,7 @@ static void gpencil_add_fake_points(const wmEvent *event, tGPsdata *p) (p->brush && (p->brush->gpencil_tool == GPAINT_TOOL_DRAW))); /* TODO: ensure sampling enough points when using circular guide, - but the arc must be around the center. (see if above to check other guides only) - */ + * but the arc must be around the center. (see if above to check other guides only). */ if (is_speed_guide && (guide->type == GP_GUIDE_CIRCULAR)) { input_samples = GP_MAX_INPUT_SAMPLES; } @@ -3583,8 +3582,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) if (ISKEYBOARD(event->type)) { if (ELEM(event->type, EVT_LEFTARROWKEY, EVT_DOWNARROWKEY, EVT_RIGHTARROWKEY, EVT_UPARROWKEY)) { /* allow some keys: - * - for frame changing [#33412] - * - for undo (during sketching sessions) + * - For frame changing T33412. + * - For undo (during sketching sessions). */ } else if (event->type == EVT_ZKEY) { @@ -3639,7 +3638,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* toggle painting mode upon mouse-button movement * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) * - RIGHTMOUSE = eraser (all) - * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) + * (Disabling RIGHTMOUSE case here results in bugs like T32647) * also making sure we have a valid event value, to not exit too early */ if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (ELEM(event->val, KM_PRESS, KM_RELEASE))) { |