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/transform/transform.c | |
parent | 4226ee0b71fec6f08897dacf3d6632526618acca (diff) |
Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 53943eb830e..10082eaa6ef 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -382,7 +382,8 @@ void projectIntViewEx(TransInfo *t, const float vec[3], int adr[2], const eV3DPr if (t->spacetype == SPACE_VIEW3D) { if (t->ar->regiontype == RGN_TYPE_WINDOW) { if (ED_view3d_project_int_global(t->ar, vec, adr, flag) != V3D_PROJ_RET_OK) { - adr[0] = (int)2140000000.0f; /* this is what was done in 2.64, perhaps we can be smarter? */ + /* this is what was done in 2.64, perhaps we can be smarter? */ + adr[0] = (int)2140000000.0f; adr[1] = (int)2140000000.0f; } } @@ -1055,7 +1056,8 @@ int transformEvent(TransInfo *t, const wmEvent *event) copy_v2_v2_int(t->mval, event->mval); - // t->redraw |= TREDRAW_SOFT; /* Use this for soft redraw. Might cause flicker in object mode */ + /* Use this for soft redraw. Might cause flicker in object mode */ + // t->redraw |= TREDRAW_SOFT; t->redraw |= TREDRAW_HARD; if (t->state == TRANS_STARTING) { @@ -1381,7 +1383,8 @@ int transformEvent(TransInfo *t, const wmEvent *event) } else { if (event->shift) { - /* bit hackish... but it prevents mmb select to print the orientation from menu */ + /* bit hackish... but it prevents mmb select to print the + * orientation from menu */ float mati[3][3]; strcpy(t->spacename, "global"); unit_m3(mati); @@ -1985,7 +1988,8 @@ static void drawTransformView(const struct bContext *C, ARegion *ar, void *arg) } } -/* just draw a little warning message in the top-right corner of the viewport to warn that autokeying is enabled */ +/* just draw a little warning message in the top-right corner of the viewport + * to warn that autokeying is enabled */ static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar) { rcti rect; @@ -2183,7 +2187,8 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) const int orientation_index_custom = BKE_scene_transform_orientation_get_index( t->scene, t->orientation.custom); - /* Maybe we need a t->con.custom_orientation? Seems like it would always match t->orientation.custom. */ + /* Maybe we need a t->con.custom_orientation? + * Seems like it would always match t->orientation.custom. */ orientation = V3D_MANIP_CUSTOM + orientation_index_custom; BLI_assert(orientation >= V3D_MANIP_CUSTOM); } @@ -2378,9 +2383,13 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve initSnapSpatial(t, t->snap_spatial); - /* EVIL! posemode code can switch translation to rotate when 1 bone is selected. will be removed (ton) */ + /* EVIL! posemode code can switch translation to rotate when 1 bone is selected. + * will be removed (ton) */ + /* EVIL2: we gave as argument also texture space context bit... was cleared */ - /* EVIL3: extend mode for animation editors also switches modes... but is best way to avoid duplicate code */ + + /* EVIL3: extend mode for animation editors also switches modes... + * but is best way to avoid duplicate code */ mode = t->mode; calculatePropRatio(t); @@ -2615,8 +2624,10 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve BMEditMesh *em = NULL;// BKE_editmesh_from_object(t->obedit); bool do_skip = false; - /* Currently only used for two of three most frequent transform ops, can include more ops. - * Note that scaling cannot be included here, non-uniform scaling will affect normals. */ + /* Currently only used for two of three most frequent transform ops, + * can include more ops. + * Note that scaling cannot be included here, + * non-uniform scaling will affect normals. */ if (ELEM(t->mode, TFM_TRANSLATION, TFM_ROTATION)) { if (em->bm->totvertsel == em->bm->totvert) { /* No need to invalidate if whole mesh is selected. */ @@ -4301,7 +4312,7 @@ static void ElementRotation_ex(TransInfo *t, TransDataContainer *tc, TransData * mul_m3_m3m3(smat, td->smtx, totmat); /* calculate the total rotatation in eulers */ - add_v3_v3v3(eul, td->ext->irot, td->ext->drot); /* we have to correct for delta rot */ + add_v3_v3v3(eul, td->ext->irot, td->ext->drot); /* correct for delta rot */ eulO_to_mat3(obmat, eul, td->ext->rotOrder); /* mat = transform, obmat = object rotation */ mul_m3_m3m3(fmat, smat, obmat); @@ -4543,7 +4554,8 @@ void freeCustomNormalArray(TransInfo *t, TransDataContainer *tc, TransCustomData BMEditMesh *em = BKE_editmesh_from_object(tc->obedit); BMesh *bm = em->bm; - for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) { /* Restore custom loop normal on cancel */ + /* Restore custom loop normal on cancel */ + for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) { BKE_lnor_space_custom_normal_to_data( bm->lnor_spacearr->lspacearr[lnor_ed->loop_index], lnor_ed->niloc, lnor_ed->clnors_data); } @@ -6107,9 +6119,12 @@ static void slide_origdata_interp_data_vert( bool co_next_ok; - /* In the unlikely case that we're next to a zero length edge - walk around the to the next. + /* In the unlikely case that we're next to a zero length edge - + * walk around the to the next. + * * Since we only need to check if the vertex is in this corner, - * its not important _which_ loop - as long as its not overlapping 'sv->co_orig_3d', see: T45096. */ + * its not important _which_ loop - as long as its not overlapping + * 'sv->co_orig_3d', see: T45096. */ project_plane_normalized_v3_v3v3(v_proj[0], co_prev, v_proj_axis); while (UNLIKELY(((co_prev_ok = (len_squared_v3v3(v_proj[1], v_proj[0]) > eps)) == false) && ((l_prev = l_prev->prev) != l->next))) @@ -6947,7 +6962,9 @@ static bool createEdgeSlideVerts_double_side(TransInfo *t, TransDataContainer *t else if (l_b == NULL && l_a && (l_a->radial_next != l_a)) l_b = l_a->radial_next; } else if (e->l != NULL) { - /* if there are non-contiguous faces, we can still recover the loops of the new edges faces */ + /* if there are non-contiguous faces, we can still recover + * the loops of the new edges faces */ + /* note!, the behavior in this case means edges may move in opposite directions, * this could be made to work more usefully. */ @@ -8547,7 +8564,8 @@ static void initSeqSlide(TransInfo *t) copy_v3_fl(t->num.val_inc, t->snap[1]); t->num.unit_sys = t->scene->unit.system; - /* Would be nice to have a time handling in units as well (supporting frames in addition to "natural" time...). */ + /* Would be nice to have a time handling in units as well + * (supporting frames in addition to "natural" time...). */ t->num.unit_type[0] = B_UNIT_NONE; t->num.unit_type[1] = B_UNIT_NONE; } |