diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-15 15:24:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-15 15:30:31 +0300 |
commit | b8e8c0e325d213f2dcf4adad5506989fa224716e (patch) | |
tree | adb3d7fa8735426ea856a929f562655b2eaf64cb /source/blender/editors/curve | |
parent | 4226ee0b71fec6f08897dacf3d6632526618acca (diff) |
Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 36 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve_add.c | 4 |
2 files changed, 25 insertions, 15 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 84f8f17d4ee..df9527e6fae 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -160,8 +160,9 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase) pt_index = 0; while (a--) { /* We cannot keep *any* reference to curve obdata, - * it might be replaced and freed while editcurve remain in use (in viewport render case e.g.). - * Note that we could use a pool to avoid lots of malloc's here, but... not really a problem for now. */ + * it might be replaced and freed while editcurve remain in use + * (in viewport render case e.g.). Note that we could use a pool to avoid + * lots of malloc's here, but... not really a problem for now. */ BezTriple *origbezt_cpy = MEM_mallocN(sizeof(*origbezt), __func__); *origbezt_cpy = *origbezt; keyIndex = init_cvKeyIndex(origbezt_cpy, key_index, nu_index, pt_index, vertex_index); @@ -180,8 +181,9 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase) pt_index = 0; while (a--) { /* We cannot keep *any* reference to curve obdata, - * it might be replaced and freed while editcurve remain in use (in viewport render case e.g.). - * Note that we could use a pool to avoid lots of malloc's here, but... not really a problem for now. */ + * it might be replaced and freed while editcurve remain in use + * (in viewport render case e.g.). Note that we could use a pool to avoid + * lots of malloc's here, but... not really a problem for now. */ BPoint *origbp_cpy = MEM_mallocN(sizeof(*origbp_cpy), __func__); *origbp_cpy = *origbp; keyIndex = init_cvKeyIndex(origbp_cpy, key_index, nu_index, pt_index, vertex_index); @@ -1272,8 +1274,9 @@ void ED_curve_editnurb_make(Object *obedit) if (actkey) { editnurb->shapenr = obedit->shapenr; - /* Apply shapekey to new nurbs of editnurb, not those of original curve (and *after* we generated keyIndex), - * else we do not have valid 'original' data to properly restore curve when leaving editmode. */ + /* Apply shapekey to new nurbs of editnurb, not those of original curve + * (and *after* we generated keyIndex), else we do not have valid 'original' data + * to properly restore curve when leaving editmode. */ BKE_keyblock_convert_to_curve(actkey, cu, &editnurb->nurbs); } } @@ -1336,7 +1339,8 @@ static int separate_exec(bContext *C, wmOperator *op) } /* 2. Duplicate the object and data. */ - newbase = ED_object_add_duplicate(bmain, scene, view_layer, oldbase, 0); /* 0 = fully linked. */ + newbase = ED_object_add_duplicate( + bmain, scene, view_layer, oldbase, 0); /* 0 = fully linked. */ DEG_relations_tag_update(bmain); newob = newbase->object; @@ -2225,7 +2229,8 @@ static void adduplicateflagNurb(Object *obedit, View3D *v3d, ListBase *newnurb, newu++; for (c = a / nu->pntsu, bp3 = bp2; c < nu->pntsv; c++, bp3 += nu->pntsu) { if (bp3->f1 & flag) { - bp3->f1 |= SURF_SEEN; /* flag as seen so skipped on future iterations */ + /* flag as seen so skipped on future iterations */ + bp3->f1 |= SURF_SEEN; if (newu == 1) newv++; } else { @@ -2722,7 +2727,8 @@ static void curve_smooth_value(ListBase *editnurb, for (last_sel = 0; last_sel < nu->pntsu; last_sel++) { /* loop over selection segments of a curve, smooth each */ - /* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */ + /* Start BezTriple code, + * this is duplicated below for points, make sure these functions stay in sync */ start_sel = -1; for (bezt = &nu->bezt[last_sel], a = last_sel; a < nu->pntsu; a++, bezt++) { if (bezt->f2 & SELECT) { @@ -2792,7 +2798,8 @@ static void curve_smooth_value(ListBase *editnurb, for (last_sel = 0; last_sel < nu->pntsu; last_sel++) { /* loop over selection segments of a curve, smooth each */ - /* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */ + /* Start BezTriple code, + * this is duplicated below for points, make sure these functions stay in sync */ start_sel = -1; for (bp = &nu->bp[last_sel], a = last_sel; a < nu->pntsu; a++, bp++) { if (bp->f1 & SELECT) { @@ -5499,7 +5506,8 @@ static bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction) while (a--) { if (bp->f1 & SELECT) { nu->flagu ^= CU_NURB_CYCLIC; - BKE_nurb_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */ + /* 1==u type is ignored for cyclic curves */ + BKE_nurb_knot_calc_u(nu); changed = true; break; } @@ -5515,12 +5523,14 @@ static bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction) if (bp->f1 & SELECT) { if (direction == 0 && nu->pntsu > 1) { nu->flagu ^= CU_NURB_CYCLIC; - BKE_nurb_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */ + /* 1==u type is ignored for cyclic curves */ + BKE_nurb_knot_calc_u(nu); changed = true; } if (direction == 1 && nu->pntsv > 1) { nu->flagv ^= CU_NURB_CYCLIC; - BKE_nurb_knot_calc_v(nu); /* 2==v type is ignored for cyclic curves */ + /* 2==v type is ignored for cyclic curves */ + BKE_nurb_knot_calc_v(nu); changed = true; } break; diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 5308660ddee..3f53fe8696a 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -343,7 +343,7 @@ Nurb *ED_curve_add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], break; case CU_PRIM_TUBE: /* Cylinder */ if (cutype == CU_NURBS) { - nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */ + nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); nu->resolu = cu->resolu; nu->flag = CU_SMOOTH; BLI_addtail(editnurb, nu); /* temporal for extrude and translate */ @@ -420,7 +420,7 @@ Nurb *ED_curve_add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], float tmp_vec[3] = {0.f, 0.f, 1.f}; xzproj = 1; - nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */ + nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); xzproj = 0; nu->resolu = cu->resolu; nu->resolv = cu->resolv; |