From aa42da03859d28900a1d01130f07c38b1e2ad34b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 27 Apr 2019 12:07:07 +1000 Subject: Cleanup: comments (long lines) in blenkernel --- source/blender/blenkernel/intern/gpencil.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'source/blender/blenkernel/intern/gpencil.c') diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index e45a4f4d649..c82b2c377fa 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -622,8 +622,10 @@ bGPDlayer *BKE_gpencil_layer_duplicate(const bGPDlayer *gpl_src) } /** - * Only copy internal data of GreasePencil ID from source to already allocated/initialized destination. - * You probably never want to use that directly, use BKE_id_copy or BKE_id_copy_ex for typical needs. + * Only copy internal data of GreasePencil ID from source + * to already allocated/initialized destination. + * You probably never want to use that directly, + * use #BKE_id_copy or #BKE_id_copy_ex for typical needs. * * WARNING! This function will not handle ID user count! * @@ -1159,7 +1161,10 @@ Material *BKE_gpencil_object_material_ensure_from_active_input_brush(Main *bmain return BKE_gpencil_object_material_ensure_from_active_input_material(bmain, ob); } -/* Guaranteed to return a material assigned to object. Returns never NULL. Only use this for materials unrelated to user input */ +/** + * Guaranteed to return a material assigned to object. Returns never NULL. + * Only use this for materials unrelated to user input. + */ Material *BKE_gpencil_object_material_ensure_from_active_input_material(Main *bmain, Object *ob) { Material *ma = give_current_material(ob, ob->actcol); @@ -1416,9 +1421,11 @@ bool BKE_gpencil_smooth_stroke(bGPDstroke *gps, int i, float inf) } /* Compute smoothed coordinate by taking the ones nearby */ - /* XXX: This is potentially slow, and suffers from accumulation error as earlier points are handled before later ones */ + /* XXX: This is potentially slow, + * and suffers from accumulation error as earlier points are handled before later ones. */ { - // XXX: this is hardcoded to look at 2 points on either side of the current one (i.e. 5 items total) + /* XXX: this is hardcoded to look at 2 points on either side of the current one + * (i.e. 5 items total). */ const int steps = 2; const float average_fac = 1.0f / (float)(steps * 2 + 1); int step; @@ -1427,8 +1434,9 @@ bool BKE_gpencil_smooth_stroke(bGPDstroke *gps, int i, float inf) madd_v3_v3fl(sco, &pt->x, average_fac); /* n-steps before/after current point */ - // XXX: review how the endpoints are treated by this algorithm - // XXX: falloff measures should also introduce some weighting variations, so that further-out points get less weight + /* XXX: review how the endpoints are treated by this algorithm. */ + /* XXX: falloff measures should also introduce some weighting variations, + * so that further-out points get less weight. */ for (step = 1; step <= steps; step++) { bGPDspoint *pt1, *pt2; int before = i - step; -- cgit v1.2.3