diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-12-07 15:53:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-12-07 15:53:03 +0300 |
commit | 1c7cfa025c87e8f31790b48cbb189949f7949ad1 (patch) | |
tree | 3869d475a9d10c005b0bb8006eb77bf55f1903d3 /source/blender/editors/sculpt_paint | |
parent | 46f518e92790a04885f4e047bb59b11019d73aa3 (diff) | |
parent | 2e2e6e3bdb694e56fcd161f06b6751e953cd2fa1 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 8 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 3 |
3 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 2d1f0cb3b0d..aebd0c10e9c 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -50,6 +50,7 @@ #include "DNA_node_types.h" #include "DNA_object_types.h" +#include "BKE_colorband.h" #include "BKE_context.h" #include "BKE_DerivedMesh.h" #include "BKE_brush.h" @@ -58,7 +59,6 @@ #include "BKE_material.h" #include "BKE_node.h" #include "BKE_paint.h" -#include "BKE_texture.h" #include "DEG_depsgraph.h" @@ -666,17 +666,17 @@ void paint_brush_color_get(struct Scene *scene, struct Brush *br, bool color_cor float color_gr[4]; switch (br->gradient_stroke_mode) { case BRUSH_GRADIENT_PRESSURE: - do_colorband(br->gradient, pressure, color_gr); + BKE_colorband_evaluate(br->gradient, pressure, color_gr); break; case BRUSH_GRADIENT_SPACING_REPEAT: { float coord = fmod(distance / br->gradient_spacing, 1.0); - do_colorband(br->gradient, coord, color_gr); + BKE_colorband_evaluate(br->gradient, coord, color_gr); break; } case BRUSH_GRADIENT_SPACING_CLAMP: { - do_colorband(br->gradient, distance / br->gradient_spacing, color_gr); + BKE_colorband_evaluate(br->gradient, distance / br->gradient_spacing, color_gr); break; } } diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 30830e4e7bc..603b8f9a185 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -44,12 +44,12 @@ #include "BLI_bitmap.h" #include "BLI_task.h" +#include "BKE_colorband.h" #include "BKE_context.h" #include "BKE_brush.h" #include "BKE_image.h" #include "BKE_paint.h" #include "BKE_report.h" -#include "BKE_texture.h" #include "DEG_depsgraph.h" @@ -1667,7 +1667,7 @@ void paint_2d_gradient_fill( break; } } - do_colorband(br->gradient, f, color_f); + BKE_colorband_evaluate(br->gradient, f, color_f); /* convert to premultiplied */ mul_v3_fl(color_f, color_f[3]); color_f[3] *= br->alpha; @@ -1697,7 +1697,7 @@ void paint_2d_gradient_fill( } } - do_colorband(br->gradient, f, color_f); + BKE_colorband_evaluate(br->gradient, f, color_f); linearrgb_to_srgb_v3_v3(color_f, color_f); rgba_float_to_uchar((unsigned char *)&color_b, color_f); ((unsigned char *)&color_b)[3] *= br->alpha; diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 900ca844dbf..7148469a9d8 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -62,6 +62,7 @@ #include "DNA_object_types.h" #include "BKE_camera.h" +#include "BKE_colorband.h" #include "BKE_context.h" #include "BKE_colortools.h" #include "BKE_DerivedMesh.h" @@ -4582,7 +4583,7 @@ static void *do_projectpaint_thread(void *ph_v) break; } } - do_colorband(brush->gradient, f, color_f); + BKE_colorband_evaluate(brush->gradient, f, color_f); color_f[3] *= ((float)projPixel->mask) * (1.0f / 65535.0f) * brush->alpha; if (is_floatbuf) { |