diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-13 04:43:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-13 04:43:49 +0400 |
commit | 2f9b7410dc712961f5684e4892660167c693cda8 (patch) | |
tree | 8898f0650969eba414f105fcf7edba10627a2968 /source/blender/editors/sculpt_paint/paint_cursor.c | |
parent | 7cf1d86e4adc4893485e34229ccbc0537931c929 (diff) |
code cleanup: warnings + style
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index c104a5fac94..0422c2f82de 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -88,7 +88,7 @@ static int same_tex_snap(TexSnapshot *snap, Brush *brush, ViewContext *vc) //(mtex->brush_map_mode != MTEX_MAP_MODE_VIEW || //(BKE_brush_size_get(vc->scene, brush) <= snap->BKE_brush_size_get)) && - (mtex->brush_map_mode != MTEX_MAP_MODE_TILED || + (mtex->brush_map_mode != MTEX_MAP_MODE_TILED || (vc->ar->winx == snap->winx && vc->ar->winy == snap->winy)) ); @@ -230,8 +230,8 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col) paint_get_tex_pixel_col(&br->mtex, x, y, rgba, pool); if (br->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) { - float curve_str = BKE_brush_curve_strength(br, len, 1); - CLAMP(curve_str, 0.0, 1.0); + float curve_str = BKE_brush_curve_strength(br, len, 1.0f); + CLAMP(curve_str, 0.0f, 1.0f); mul_v4_fl(rgba, curve_str); /* Falloff curve */ } buffer[index * 4] = rgba[0] * 255; @@ -245,10 +245,10 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col) avg += br->texture_sample_bias; if (br->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) - avg *= BKE_brush_curve_strength(br, len, 1); /* Falloff curve */ + avg *= BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */ /* clamp to avoid precision overflow */ - CLAMP(avg, 0.0, 1.0); + CLAMP(avg, 0.0f, 1.0f); buffer[index] = 255 - (GLubyte)(255 * avg); } } |