diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-11-17 15:00:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-11-17 15:00:57 +0400 |
commit | 8f7f8d679ce54fe2fb3c51a10d1d8f1a53c548e5 (patch) | |
tree | ebfd8281795823048b78ce4dbc1cdf2708e29be0 | |
parent | c3788b60f4af8ede604375e9f5275691bc7fa7f2 (diff) |
Style Cleanup: whitespace
4 files changed, 37 insertions, 33 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index dafc0c3c754..8aeacda8100 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -335,9 +335,10 @@ void defvert_normalize_lock_single(MDeformVert *dvert, } /* Same as defvert_normalize() if no locked vgroup is a member of the subset */ -void defvert_normalize_lock_map(MDeformVert *dvert, - const bool *vgroup_subset, const int vgroup_tot, - const bool *lock_flags, const int defbase_tot) +void defvert_normalize_lock_map( + MDeformVert *dvert, + const bool *vgroup_subset, const int vgroup_tot, + const bool *lock_flags, const int defbase_tot) { if (dvert->totweight == 0) { /* nothing */ diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 5017c00259b..af3160b004d 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -543,7 +543,7 @@ static void offset_meet(EdgeHalf *e1, EdgeHalf *e2, BMVert *v, BMFace *f, * of not meeting at the same point by choosing to change the bevel offset on one * of the appropriate side of either e1 or e2, in order that the lines can meet on emid. */ static void offset_on_edge_between(BevelParams *bp, EdgeHalf *e1, EdgeHalf *e2, EdgeHalf *emid, - BMVert *v, float meetco[3]) + BMVert *v, float meetco[3]) { BLI_assert(e1->is_bev && e2->is_bev && !emid->is_bev); @@ -1965,7 +1965,8 @@ static void build_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv) /* Return the angle between the two faces adjacent to e. * If there are not two, return 0. */ -static float edge_face_angle(EdgeHalf *e) { +static float edge_face_angle(EdgeHalf *e) +{ if (e->fprev && e->fnext) { /* angle between faces is supplement of angle between face normals */ return (float)M_PI - angle_normalized_v3v3(e->fprev->no, e->fnext->no); @@ -2160,30 +2161,31 @@ static void bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v) } else { switch (bp->offset_type) { - case BEVEL_AMT_OFFSET: - e->offset_l = bp->offset; - break; - case BEVEL_AMT_WIDTH: - z = fabs(2.0f * sinf(edge_face_angle(e) / 2.0f)); - if (z < BEVEL_EPSILON) - e->offset_l = 0.01f * bp->offset; /* undefined behavior, so tiny bevel */ - else - e->offset_l = bp->offset / z; - break; - case BEVEL_AMT_DEPTH: - z = fabs(cosf(edge_face_angle(e) / 2.0f)); - if (z < BEVEL_EPSILON) - e->offset_l = 0.01f * bp->offset; /* undefined behavior, so tiny bevel */ - else - e->offset_l = bp->offset / z; - break; - case BEVEL_AMT_PERCENT: - e->offset_l = BM_edge_calc_length(e->prev->e) * bp->offset / 100.0f; - e->offset_r = BM_edge_calc_length(e->next->e) * bp->offset / 100.0f; - break; - default: - BLI_assert(!"bad bevel offset kind"); - e->offset_l = bp->offset; + case BEVEL_AMT_OFFSET: + e->offset_l = bp->offset; + break; + case BEVEL_AMT_WIDTH: + z = fabsf(2.0f * sinf(edge_face_angle(e) / 2.0f)); + if (z < BEVEL_EPSILON) + e->offset_l = 0.01f * bp->offset; /* undefined behavior, so tiny bevel */ + else + e->offset_l = bp->offset / z; + break; + case BEVEL_AMT_DEPTH: + z = fabsf(cosf(edge_face_angle(e) / 2.0f)); + if (z < BEVEL_EPSILON) + e->offset_l = 0.01f * bp->offset; /* undefined behavior, so tiny bevel */ + else + e->offset_l = bp->offset / z; + break; + case BEVEL_AMT_PERCENT: + e->offset_l = BM_edge_calc_length(e->prev->e) * bp->offset / 100.0f; + e->offset_r = BM_edge_calc_length(e->next->e) * bp->offset / 100.0f; + break; + default: + BLI_assert(!"bad bevel offset kind"); + e->offset_l = bp->offset; + break; } if (bp->offset_type != BEVEL_AMT_PERCENT) e->offset_r = e->offset_l; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 59c16f61295..8283197c70b 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -397,7 +397,7 @@ void applyGridAbsolute(TransInfo *t) copy_v3_v3(iloc, td->ob->obmat[3]); } - mul_v3_v3fl(loc, iloc, 1.0f/grid_size); + mul_v3_v3fl(loc, iloc, 1.0f / grid_size); loc[0] = floorf(loc[0]); loc[1] = floorf(loc[1]); loc[2] = floorf(loc[2]); @@ -1441,7 +1441,7 @@ static bool snapCurve(short snap_mode, ARegion *ar, Object *ob, Curve *cu, float mul_mat3_m4_v3(imat, ray_normal_local); for (nu = (ob->mode == OB_MODE_EDIT ? cu->editnurb->nurbs.first : cu->nurb.first); nu; nu = nu->next) { - for (u = 0; u < nu->pntsu; u++){ + for (u = 0; u < nu->pntsu; u++) { switch (snap_mode) { case SCE_SNAP_MODE_VERTEX: { @@ -1458,7 +1458,8 @@ static bool snapCurve(short snap_mode, ARegion *ar, Object *ob, Curve *cu, float if (!(nu->bezt[u].f3 & SELECT) && !(nu->bezt[u].h2 & HD_ALIGN && nu->bezt[u].f1 & SELECT)) { retval |= snapVertex(ar, nu->bezt[u].vec[2], NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist_px, r_depth); } - } else { + } + else { /* curve is not visible outside editmode if nurb length less than two */ if (nu->pntsu > 1) { retval |= snapVertex(ar, nu->bezt[u].vec[1], NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist_px, r_depth); diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c index 81ebc7c4c3b..5e7bbfaa1d3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c +++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c @@ -70,7 +70,7 @@ void ntreeCompositColorBalanceSyncFromCDL(bNodeTree *UNUSED(ntree), bNode *node) for (c = 0; c < 3; ++c) { float d = n->slope[c] + n->offset[c]; - n->lift[c] = (d != 0.0f ? n->slope[c] + 2.0f*n->offset[c] / d : 0.0f); + n->lift[c] = (d != 0.0f ? n->slope[c] + 2.0f * n->offset[c] / d : 0.0f); n->gain[c] = d; n->gamma[c] = (n->power[c] != 0.0f) ? 1.0f / n->power[c] : 1000000.0f; } |