Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / sculpt_paint / paint_image_2d.c
index 83a5a0d0b1ba6dd2fd3d28c86811e621a6faedfa..c2ce9d8378288eda490ffbd53d2b7c0e5f979e7a 100644 (file)
@@ -433,7 +433,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]);
                        }
                }
        }