diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
commit | 2d2d36fe3b2f3e7eed7d05714abc80f1a5a82303 (patch) | |
tree | 7ad54825db128e59312fbf787555fd91edf09a07 /source/blender/editors/sculpt_paint | |
parent | 5d9256404159670bec6d65557697accb5b3111b8 (diff) |
code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 12 |
4 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index ebc255f4e43..b5d44676cf6 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -342,7 +342,8 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc, window[1] = y + vc->ar->winrct.ymin; if (vc->obact->sculpt && vc->obact->sculpt->pbvh && - sculpt_stroke_get_location(C, location, window)) { + sculpt_stroke_get_location(C, location, window)) + { *pixel_radius = project_brush_radius(vc, BKE_brush_unprojected_radius_get(scene, brush), diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d5c7b66f695..e6ef3001eeb 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -2131,7 +2131,9 @@ static void project_bucket_clip_face( /* remove doubles */ /* first/last check */ - if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE && fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE) { + if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE && + fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE) + { (*tot)--; } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 368729723eb..23d1c0090a0 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -225,7 +225,8 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c brush = brush->id.next ? brush->id.next : bmain->brush.first) { if ((brush->ob_mode & ob_mode) && - (brush_tool(brush, tool_offset) == tool)) { + (brush_tool(brush, tool_offset) == tool)) + { return brush; } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 6773d50d95d..aea29c2d166 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -350,7 +350,8 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, bb_max, ar, rv3d, - ob)) { + ob)) + { return 0; } @@ -2776,7 +2777,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) } if (!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_MASK) && - brush->autosmooth_factor > 0) { + brush->autosmooth_factor > 0) + { if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) { smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), FALSE); } @@ -3196,7 +3198,8 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss) for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Mirror && - (md->mode & eModifierMode_Realtime)) { + (md->mode & eModifierMode_Realtime)) + { MirrorModifierData *mmd = (MirrorModifierData *)md; if (mmd->flag & MOD_MIR_CLIPPING) { @@ -3355,7 +3358,8 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) if (ELEM5(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK, - SCULPT_TOOL_THUMB)) { + SCULPT_TOOL_THUMB)) + { float grab_location[3], imat[4][4], delta[3], loc[3]; if (cache->first_time) { |