diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 09:29:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 09:29:06 +0400 |
commit | 511451c8b87f9ab07df15ee36592f1071101b2d0 (patch) | |
tree | 67afc38b1c2bc86ef7e9750a91523ba4ad537801 /source/blender/editors/sculpt_paint | |
parent | 42063f36af9643530e3b23cf271c95dc1be0457d (diff) |
style cleanup
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 22 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 11 |
2 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index f6b706ba067..10e0e4c810a 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -91,10 +91,10 @@ static int same_tex_snap(TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool co //(BKE_brush_size_get(vc->scene, brush) <= snap->BKE_brush_size_get)) && (mtex->brush_map_mode != MTEX_MAP_MODE_TILED || - (vc->ar->winx == snap->winx && - vc->ar->winy == snap->winy)) && + (vc->ar->winx == snap->winx && + vc->ar->winy == snap->winy)) && snap->old_zoom == zoom && - snap->old_col == col + snap->old_col == col ); } @@ -380,11 +380,11 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) len = sqrtf(x * x + y * y); if (len <= 1) { - float avg = BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */ + float avg = BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */ - /* clamp to avoid precision overflow */ - CLAMP(avg, 0.0f, 1.0f); - buffer[index] = 255 - (GLubyte)(255 * avg); + /* clamp to avoid precision overflow */ + CLAMP(avg, 0.0f, 1.0f); + buffer[index] = 255 - (GLubyte)(255 * avg); } else { @@ -643,13 +643,12 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush, /* Draw an overlay that shows what effect the brush's texture will * have on brush strength */ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush, - ViewContext *vc, int x, int y, float zoom) + ViewContext *vc, int x, int y, float zoom) { rctf quad; /* check for overlay mode */ - if (!(brush->overlay_flags & BRUSH_OVERLAY_CURSOR)) - { + if (!(brush->overlay_flags & BRUSH_OVERLAY_CURSOR)) { return; } @@ -729,7 +728,8 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, false); if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR)) paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom); - } else { + } + else { if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY)) paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, true); if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR)) diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index f0265fd4e69..ae578ffefd1 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -497,7 +497,8 @@ static void stencil_set_target(StencilControlData *scd) scd->dim_target = br->mask_stencil_dimension; scd->rot_target = &br->mask_mtex.rot; scd->pos_target = br->mask_stencil_pos; - } else { + } + else { copy_v2_v2(scd->init_sdim, br->stencil_dimension); copy_v2_v2(scd->init_spos, br->stencil_pos); scd->init_rot = br->mtex.rot; @@ -598,8 +599,8 @@ static void stencil_control_calculate(StencilControlData *scd, const int mval[2] mdiff[0] = factor * scd->init_sdim[0]; if (scd->constrain_mode != STENCIL_CONSTRAINT_X) mdiff[1] = factor * scd->init_sdim[1]; - CLAMP(mdiff[0], 5.0, 10000); - CLAMP(mdiff[1], 5.0, 10000); + CLAMP(mdiff[0], 5.0f, 10000.0f); + CLAMP(mdiff[1], 5.0f, 10000.0f); copy_v2_v2(scd->dim_target, mdiff); break; } @@ -676,8 +677,8 @@ static int stencil_control_poll(bContext *C) Brush *br = BKE_paint_brush(paint); return (br && - (br->mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL || - br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL)); + (br->mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL || + br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL)); } static void BRUSH_OT_stencil_control(wmOperatorType *ot) |