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 | |
parent | c279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff) | |
parent | d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 28 | ||||
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 18 | ||||
-rw-r--r-- | source/blender/editors/gpencil/editaction_gpencil.c | 12 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 20 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 12 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 4 |
10 files changed, 64 insertions, 64 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index 1a2d6d67cbe..1a51875af9e 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -380,7 +380,7 @@ static void gp_draw_stroke_2d( /* if the first segment, start of segment is segment's normal */ if (i == 0) { /* draw start cap first - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -421,7 +421,7 @@ static void gp_draw_stroke_2d( /* calculate gradient to apply * - as basis, use just pthick * bisector gradient - * - if cross-section not as thick as it should be, add extra padding to fix it + * - if cross-section not as thick as it should be, add extra padding to fix it */ mt[0] = mb[0] * pthick; mt[1] = mb[1] * pthick; @@ -463,7 +463,7 @@ static void gp_draw_stroke_2d( immVertex2fv(pos, t1); /* draw end cap as last step - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -893,8 +893,8 @@ static void gp_draw_data_all( /* ............................ * XXX - * We need to review the calls below, since they may be/are not that suitable for - * the new ways that we intend to be drawing data... + * We need to review the calls below, since they may be/are not that suitable for + * the new ways that we intend to be drawing data... * ............................ */ /* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */ 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; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 03589bb69ae..2b2e3772e4d 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -879,7 +879,7 @@ static void gp_draw_stroke_2d( /* if the first segment, start of segment is segment's normal */ if (i == 0) { /* draw start cap first - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -919,8 +919,8 @@ static void gp_draw_stroke_2d( normalize_v2(mb); /* calculate gradient to apply - * - as basis, use just pthick * bisector gradient - * - if cross-section not as thick as it should be, add extra padding to fix it + * - as basis, use just pthick * bisector gradient + * - if cross-section not as thick as it should be, add extra padding to fix it */ mt[0] = mb[0] * pthick; mt[1] = mb[1] * pthick; @@ -965,7 +965,7 @@ static void gp_draw_stroke_2d( immVertex2fv(attr_id.pos, t1); /* draw end cap as last step - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -1557,11 +1557,11 @@ static void gp_draw_data_layers(RegionView3D *rv3d, gp_draw_strokes(&tgpw); /* Draw verts of selected strokes - * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering - * - locked layers can't be edited, so there's no point showing these verts - * as they will have no bearings on what gets edited - * - only show when in editmode, since operators shouldn't work otherwise - * (NOTE: doing it this way means that the toggling editmode shows visible change immediately) + * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering + * - locked layers can't be edited, so there's no point showing these verts + * as they will have no bearings on what gets edited + * - only show when in editmode, since operators shouldn't work otherwise + * (NOTE: doing it this way means that the toggling editmode shows visible change immediately) */ /* XXX: perhaps we don't want to show these when users are drawing... */ if ((G.f & G_RENDER_OGL) == 0 && diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 08680ba1e88..57bba10fa50 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -308,10 +308,10 @@ void ED_gplayer_frames_keytype_set(bGPDlayer *gpl, short type) /* -------------------------------------- */ /* Copy and Paste Tools */ /* - The copy/paste buffer currently stores a set of GP_Layers, with temporary - * GP_Frames with the necessary strokes + * GP_Frames with the necessary strokes * - Unless there is only one element in the buffer, names are also tested to check for compatibility. * - All pasted frames are offset by the same amount. This is calculated as the difference in the times of - * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). + * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). * - The earliest frame is calculated per copy operation. */ @@ -483,10 +483,10 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) /* This should be the right frame... as it may be a pre-existing frame, * must make sure that only compatible stroke types get copied over - * - We cannot just add a duplicate frame, as that would cause errors - * - For now, we don't check if the types will be compatible since we - * don't have enough info to do so. Instead, we simply just paste, - * af it works, it will show up. + * - We cannot just add a duplicate frame, as that would cause errors + * - For now, we don't check if the types will be compatible since we + * don't have enough info to do so. Instead, we simply just paste, + * if it works, it will show up. */ for (gps = gpfs->strokes.first; gps; gps = gps->next) { /* make a copy of stroke, then of its points array */ diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 5c1b029fe95..18ff0efd3f9 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -628,9 +628,9 @@ static bool gp_brush_pinch_apply( copy_v3_v3(save_pt, &pt->x); /* Scale down standard influence value to get it more manageable... - * - No damping = Unmanageable at > 0.5 strength - * - Div 10 = Not enough effect - * - Div 5 = Happy medium... (by trial and error) + * - No damping = Unmanageable at > 0.5 strength + * - Div 10 = Not enough effect + * - Div 5 = Happy medium... (by trial and error) */ inf = gp_brush_influence_calc(gso, radius, co) / 5.0f; @@ -1438,7 +1438,7 @@ static bool gpsculpt_brush_do_stroke( } else { /* Loop over the points in the stroke, checking for intersections - * - an intersection means that we touched the stroke + * - an intersection means that we touched the stroke */ for (i = 0; (i + 1) < gps->totpoints; i++) { /* Get points to work with */ @@ -1465,7 +1465,7 @@ static bool gpsculpt_brush_do_stroke( { /* Check if point segment of stroke had anything to do with * brush 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(gso->mval, gso->mval_prev, radius, pc1[0], pc1[1], pc2[0], pc2[1])) { /* Apply operation to these points */ diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 9ec2915b60c..fc0464af430 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -146,7 +146,7 @@ static const EnumPropertyItem *rna_GPConvert_mode_items( /* --- */ /* convert the coordinates from the given stroke point into 3d-coordinates - * - assumes that the active space is the 3D-View + * - assumes that the active space is the 3D-View */ static void gp_strokepoint_convertcoords( bContext *C, bGPdata *gpd, bGPDlayer *gpl, bGPDstroke *gps, bGPDspoint *source_pt, @@ -1173,7 +1173,7 @@ static void gp_layer_to_curve( } /* init the curve object (remove rotation and get curve data from it) - * - must clear transforms set on object, as those skew our results + * - must clear transforms set on object, as those skew our results */ ob = BKE_object_add_only_object(bmain, OB_CURVE, gpl->info); cu = ob->data = BKE_curve_add(bmain, gpl->info, OB_CURVE); diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 99a6710ea4d..1cdc8274d32 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -408,11 +408,11 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index bool t_b = false; /* Horizontal leak (check vertical pixels) - * X - * X - * xB7 - * X - * X + * X + * X + * xB7 + * X + * X */ if (type == LEAK_HORZ) { /* pixels on top */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f95122b2282..f60c7892ab5 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -378,7 +378,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] 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 */ /* verify valid zdepth, if it's wrong, the default darwing mode is used @@ -399,8 +399,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); @@ -588,7 +588,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); @@ -853,7 +853,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->runtime.sbuffer_size >= 2) ? 2 : gpd->runtime.sbuffer_size; @@ -1448,7 +1448,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, pc0[0], pc0[1], pc2[0], pc2[1])) { if ((gp_stroke_eraser_is_occluded(p, pt0, pc0[0], pc0[1]) == false) || @@ -1803,7 +1803,7 @@ static bool gp_session_initdata(bContext *C, wmOperator *op, 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; @@ -3020,9 +3020,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))) { diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 815f420f532..b3606d26bee 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -123,10 +123,10 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op) } /* if deselecting, we need to deselect strokes across all frames - * - Currently, an exception is only given for deselection - * Selecting and toggling should only affect what's visible, - * while deselecting helps clean up unintended/forgotten - * stuff on other frames + * - Currently, an exception is only given for deselection + * Selecting and toggling should only affect what's visible, + * while deselecting helps clean up unintended/forgotten + * stuff on other frames */ if (action == SEL_DESELECT) { /* deselect strokes across editable layers @@ -887,7 +887,7 @@ static bool gp_stroke_do_circle_sel( } else { /* Loop over the points in the stroke, checking for intersections - * - an intersection means that we touched the stroke + * - an intersection means that we touched the stroke */ bool hit = false; for (i = 0; (i + 1) < gps->totpoints; i++) { @@ -910,7 +910,7 @@ static bool gp_stroke_do_circle_sel( /* 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, x0, y0, x1, y1)) { /* change selection of stroke, and then of both points diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 708d8f37e58..1dc46d2850d 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -161,8 +161,8 @@ void gpencil_undo_push(bGPdata *gpd) } /* limit number of undo steps to the maximum undo steps - * - to prevent running out of memory during **really** - * long drawing sessions (triggering swapping) + * - to prevent running out of memory during **really** + * long drawing sessions (triggering swapping) */ /* TODO: Undo-memory constraint is not respected yet, but can be added if we have any need for it */ if (U.undosteps && !BLI_listbase_is_empty(&undo_nodes)) { |