diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-07 19:02:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-07 19:02:48 +0300 |
commit | b49184b608df297195c5f0e81da4d8d9ddfb9213 (patch) | |
tree | c2624887be563319a7138516d2fcc6100acdb2c6 /source/blender/blenkernel | |
parent | f62b826533422e5de3b08601e5511c233deda529 (diff) | |
parent | f74d85ffc8232a859b1419f5dc25b244ae04375f (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/seqmodifier.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index e7fa4cee587..337d1a1a149 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -955,9 +955,9 @@ void curvemapping_evaluate_premulRGB(const CurveMapping *cumap, unsigned char ve curvemapping_evaluate_premulRGBF(cumap, vecout, vecin); - vecout_byte[0] = FTOCHAR(vecout[0]); - vecout_byte[1] = FTOCHAR(vecout[1]); - vecout_byte[2] = FTOCHAR(vecout[2]); + vecout_byte[0] = unit_float_to_uchar_clamp(vecout[0]); + vecout_byte[1] = unit_float_to_uchar_clamp(vecout[1]); + vecout_byte[2] = unit_float_to_uchar_clamp(vecout[2]); } int curvemapping_RGBA_does_something(const CurveMapping *cumap) diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index c91d3b32e75..0135abc7edb 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1810,7 +1810,7 @@ static void dynamic_paint_apply_surface_vpaint_cb( } /* apply wetness */ if (mloopcol_wet) { - const char c = FTOCHAR(pPoint[v_index].wetness); + const char c = unit_float_to_uchar_clamp(pPoint[v_index].wetness); mloopcol_wet[l_index].r = c; mloopcol_wet[l_index].g = c; mloopcol_wet[l_index].b = c; @@ -1840,7 +1840,7 @@ static void dynamic_paint_apply_surface_vpaint_cb( rgb_float_to_uchar((unsigned char *)&mloopcol_preview[l_index].r, c); } else { - const char c = FTOCHAR(pPoint[v_index].wetness); + const char c = unit_float_to_uchar_clamp(pPoint[v_index].wetness); mloopcol_preview[l_index].r = c; mloopcol_preview[l_index].g = c; mloopcol_preview[l_index].b = c; diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c index e2f74dbab3c..4a483d439e4 100644 --- a/source/blender/blenkernel/intern/seqmodifier.c +++ b/source/blender/blenkernel/intern/seqmodifier.c @@ -532,7 +532,7 @@ static void brightcontrast_apply_threaded(int width, int height, unsigned char * v = (float) pixel[c] / 255.0f * (1.0f - t) + v * t; } - pixel[c] = FTOCHAR(v); + pixel[c] = unit_float_to_uchar_clamp(v); } } else if (rect_float) { |