diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:12:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:21:34 +0300 |
commit | 55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch) | |
tree | 563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors/gpencil/annotate_paint.c | |
parent | c279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff) | |
parent | d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/gpencil/annotate_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 57be09d807c..e9b862cba9e 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -252,14 +252,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; @@ -278,7 +278,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] if (gpd->runtime.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 { @@ -292,8 +292,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); @@ -355,7 +355,7 @@ static short gp_stroke_addpoint( } 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->runtime.sbuffer) + 1); @@ -460,8 +460,8 @@ static short gp_stroke_addpoint( } /* simplify a stroke (in buffer) before storing it - * - applies a reverse Chaikin filter - * - code adapted from etch-a-ton branch + * - applies a reverse Chaikin filter + * - code adapted from etch-a-ton branch */ static void gp_stroke_simplify(tGPsdata *p) { @@ -480,15 +480,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->runtime.sbuffer = NULL; gp_session_validatebuffer(p); gpd->runtime.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) \ { \ @@ -550,7 +550,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) int depth_margin = (ts->annotate_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->runtime.sbuffer_size >= 2) ? 2 : gpd->runtime.sbuffer_size; @@ -973,7 +973,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; |