diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-21 17:18:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-21 23:30:04 +0300 |
commit | 0ac990d088d553c27f5360f62e142e99f087890a (patch) | |
tree | ef3637e9f8086bc937b56777ea9b1f36f97790a4 /source/blender/editors/gpencil/gpencil_brush.c | |
parent | f8b2268f4fbe92a1860c525f70fdc293304575ff (diff) |
Cleanup: comments (long lines) in editors
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_brush.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 627e05393ff..c1503bb57b2 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -302,7 +302,8 @@ static float gp_brush_influence_calc(tGP_BrushEditData *gso, const int radius, c /* ----------------------------------------------- */ /* Smooth Brush */ -/* A simple (but slower + inaccurate) smooth-brush implementation to test the algorithm for stroke smoothing */ +/* A simple (but slower + inaccurate) + * smooth-brush implementation to test the algorithm for stroke smoothing. */ static bool gp_brush_smooth_apply( tGP_BrushEditData *gso, bGPDstroke *gps, int pt_index, const int radius, const int co[2]) { @@ -351,7 +352,8 @@ static bool gp_brush_thickness_apply( inf = gp_brush_influence_calc(gso, radius, co) / 10.0f; /* apply */ - // XXX: this is much too strong, and it should probably do some smoothing with the surrounding stuff + /* XXX: this is much too strong, + * and it should probably do some smoothing with the surrounding stuff. */ if (gp_brush_invert_check(gso)) { /* make line thinner - reduce stroke pressure */ pt->pressure -= inf; @@ -801,7 +803,16 @@ static bool gp_brush_randomize_apply( mul_v2_fl(svec, fac); } - //printf("%f %f (%f), nco = {%f %f}, co = %d %d\n", svec[0], svec[1], fac, nco[0], nco[1], co[0], co[1]); +#if 0 + printf("%f %f (%f), nco = {%f %f}, co = %d %d\n", + svec[0], + svec[1], + fac, + nco[0], + nco[1], + co[0], + co[1]); +#endif /* convert to dataspace */ if (gps->flag & GP_STROKE_3DSPACE) { @@ -1106,7 +1117,8 @@ static void gp_brush_clone_adjust(tGP_BrushEditData *gso) gp_brush_grab_calc_dvec(gso); /* For each of the stored strokes, apply the offset to each point */ - /* NOTE: Again this assumes that in the 3D view, we only have 3d space and not screenspace strokes... */ + /* NOTE: Again this assumes that in the 3D view, + * we only have 3d space and not screenspace strokes... */ for (snum = 0; snum < data->totitems; snum++) { bGPDstroke *gps = data->new_strokes[snum]; bGPDspoint *pt; @@ -1453,7 +1465,8 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso, pt1 = gps->points + i; pt2 = gps->points + i + 1; - /* Skip if neither one is selected (and we are only allowed to edit/consider selected points) */ + /* Skip if neither one is selected + * (and we are only allowed to edit/consider selected points) */ if (gso->settings->flag & GP_SCULPT_SETT_FLAG_SELECT_MASK) { if (!(pt1->flag & GP_SPOINT_SELECT) && !(pt2->flag & GP_SPOINT_SELECT)) { include_last = false; @@ -1501,9 +1514,10 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso, changed |= ok; } else if (include_last) { - /* This case is for cases where for whatever reason the second vert (1st here) doesn't get included - * because the whole edge isn't in bounds, but it would've qualified since it did with the - * previous step (but wasn't added then, to avoid double-ups) + /* This case is for cases where for whatever reason the second vert (1st here) + * doesn't get included because the whole edge isn't in bounds, + * but it would've qualified since it did with the previous step + * (but wasn't added then, to avoid double-ups). */ changed |= apply(gso, gps, i, radius, pc1); include_last = false; |