diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 0eb74f137ca..27cde27fdf7 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -241,7 +241,7 @@ static void gp_get_3d_reference(tGPsdata *p, float vec[3]) Object *ob = (Object *)p->ownerPtr.data; /* active Object - * - use relative distance of 3D-cursor from object center + * - use relative distance of 3D-cursor from object center */ sub_v3_v3v3(vec, fp, ob->loc); } @@ -266,14 +266,14 @@ static bool gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2]) return true; /* check if mouse moved at least certain distance on both axes (best case) - * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand + * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand */ else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX)) return true; /* check if the distance since the last point is significant enough - * - prevents points being added too densely - * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though + * - prevents points being added too densely + * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though */ else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX) return true; @@ -351,7 +351,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) { if (gpencil_project_check(p) && (ED_view3d_autodist_simple(p->ar, mval, out, 0, depth))) { /* projecting onto 3D-Geometry - * - nothing more needs to be done here, since view_autodist_simple() has already done it + * - nothing more needs to be done here, since view_autodist_simple() has already done it */ } else { @@ -365,8 +365,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] * works OK, but it could of course be improved. * * TODO: - * - investigate using nearest point(s) on a previous stroke as - * reference point instead or as offset, for easier stroke matching + * - investigate using nearest point(s) on a previous stroke as + * reference point instead or as offset, for easier stroke matching */ gp_get_3d_reference(p, rvec); @@ -507,7 +507,7 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure, } else { /* just reset the endpoint to the latest value - * - assume that pointers for this are always valid... + * - assume that pointers for this are always valid... */ pt = ((tGPspoint *)(gpd->sbuffer) + 1); @@ -673,8 +673,8 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure, } /* simplify a stroke (in buffer) before storing it - * - applies a reverse Chaikin filter - * - code adapted from etch-a-ton branch (editarmature_sketch.c) + * - applies a reverse Chaikin filter + * - code adapted from etch-a-ton branch (editarmature_sketch.c) */ static void gp_stroke_simplify(tGPsdata *p) { @@ -693,15 +693,15 @@ static void gp_stroke_simplify(tGPsdata *p) return; /* clear buffer (but don't free mem yet) so that we can write to it - * - firstly set sbuffer to NULL, so a new one is allocated - * - secondly, reset flag after, as it gets cleared auto + * - firstly set sbuffer to NULL, so a new one is allocated + * - secondly, reset flag after, as it gets cleared auto */ gpd->sbuffer = NULL; gp_session_validatebuffer(p); gpd->sbuffer_sflag = flag; /* macro used in loop to get position of new point - * - used due to the mixture of datatypes in use here + * - used due to the mixture of datatypes in use here */ #define GP_SIMPLIFY_AVPOINT(offs, sfac) \ { \ @@ -763,7 +763,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) int depth_margin = (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0; /* get total number of points to allocate space for - * - drawing straight-lines only requires the endpoints + * - drawing straight-lines only requires the endpoints */ if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) totelem = (gpd->sbuffer_size >= 2) ? 2 : gpd->sbuffer_size; @@ -1189,7 +1189,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, { /* Check if point segment of stroke had anything to do with * eraser region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(mval, mvalo, radius, pc1[0], pc1[1], pc2[0], pc2[1])) { if ((gp_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) || @@ -1197,8 +1197,8 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, { /* Point is affected: */ /* 1) Adjust thickness - * - Influence of eraser falls off with distance from the middle of the eraser - * - Second point gets less influence, as it might get hit again in the next segment + * - Influence of eraser falls off with distance from the middle of the eraser + * - Second point gets less influence, as it might get hit again in the next segment */ pt1->pressure -= gp_stroke_eraser_calc_influence(p, mval, radius, pc1) * strength; pt2->pressure -= gp_stroke_eraser_calc_influence(p, mval, radius, pc2) * strength / 2.0f; @@ -1411,7 +1411,7 @@ static bool gp_session_initdata(bContext *C, tGPsdata *p) /* RegionView3D *rv3d = ar->regiondata; */ /* set current area - * - must verify that region data is 3D-view (and not something else) + * - must verify that region data is 3D-view (and not something else) */ /* CAUTION: If this is the "toolbar", then this will change on the first stroke */ p->sa = curarea; @@ -2488,9 +2488,9 @@ 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) / polyline (toolbox only) - * - RIGHTMOUSE = polyline (hotkey) / eraser (all) - * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) + * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only) + * - RIGHTMOUSE = polyline (hotkey) / eraser (all) + * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) * 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))) { |