Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-02-08 22:04:42 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-02-11 19:02:29 +0300
commit64e65442a1857033a9f139893eaff56b53cbd667 (patch)
tree656b0d0420622b6b2690e36840d432c21b67acbb /source/blender/editors/sculpt_paint/paint_image_2d.c
parent395e91b87cf73a9f4d6490f4eb1e462c2a02b71b (diff)
Cleanup: Sculpt/Paint, use correct types and iterator variable declaration
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6788
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index a667c7062e6..c5c2c524af9 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -446,9 +446,9 @@ static unsigned short *brush_painter_curve_mask_new(BrushPainter *painter,
float len = len_v2(xy_rot);
float p = len / radius;
if (hardness < 1.0f) {
- p = (p - hardness) / (1 - hardness);
+ p = (p - hardness) / (1.0f - hardness);
p = 1.0f - p;
- CLAMP(p, 0, 1);
+ CLAMP(p, 0.0f, 1.0f);
}
else {
p = 1.0;
@@ -574,7 +574,7 @@ static void brush_painter_imbuf_update(BrushPainter *painter,
/* get brush color */
if (brush->imagepaint_tool == PAINT_TOOL_DRAW) {
paint_brush_color_get(
- scene, brush, use_color_correction, cache->invert, 0.0, 1.0, brush_rgb, display);
+ scene, brush, use_color_correction, cache->invert, 0.0f, 1.0f, brush_rgb, display);
}
else {
brush_rgb[0] = 1.0f;