From f74d85ffc8232a859b1419f5dc25b244ae04375f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 May 2018 17:31:28 +0200 Subject: Cleanup: rename char/float conversion functions - FTOCHAR -> unit_float_to_uchar_clamp - F3TOCHAR3 -> unit_float_to_uchar_clamp_v3 (swap args) - F4TOCHAR4 -> unit_float_to_uchar_clamp_v4 (swap args) - FTOUSHORT -> unit_float_to_ushort_clamp - USHORTTOUCHAR -> unit_ushort_to_uchar --- source/blender/editors/sculpt_paint/paint_image_2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c') diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index c1dd31ea055..37096f9e660 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -432,7 +432,7 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size, float pre unsigned char *dst = (unsigned char *)ibuf->rect + (y * size + x) * 4; rgb_float_to_uchar(dst, rgba); - dst[3] = FTOCHAR(rgba[3]); + dst[3] = unit_float_to_uchar_clamp(rgba[3]); } } } -- cgit v1.2.3