diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index ea0e30a6635..eb96d1d20d5 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -38,9 +38,7 @@ #include "DNA_space_types.h" #include "DNA_object_types.h" -#include "BLI_math.h" -#include "BLI_rect.h" #include "BLI_math_color_blend.h" #include "BLI_stack.h" #include "BLI_bitmap.h" @@ -65,7 +63,6 @@ #include "UI_view2d.h" -#include "RE_shader_ext.h" #include "GPU_draw.h" @@ -348,8 +345,8 @@ static unsigned short *brush_painter_curve_mask_new(BrushPainter *painter, int d { Brush *brush = painter->brush; - int xoff = -diameter * 0.5f + 0.5f; - int yoff = -diameter * 0.5f + 0.5f; + int xoff = -radius; + int yoff = -radius; unsigned short *mask, *m; int x, y; @@ -362,7 +359,7 @@ static unsigned short *brush_painter_curve_mask_new(BrushPainter *painter, int d float xy[2] = {x + xoff, y + yoff}; float len = len_v2(xy); - *m = (unsigned short)(65535.0f * BKE_brush_curve_strength_clamp(brush, len, radius)); + *m = (unsigned short)(65535.0f * BKE_brush_curve_strength(brush, len, radius)); } } @@ -411,11 +408,11 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size, float pre if (is_texbrush) { brush_imbuf_tex_co(&tex_mapping, x, y, texco); BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool); - mul_v3_v3(rgba, brush_rgb); /* TODO(sergey): Support texture paint color space. */ if (!use_float) { IMB_colormanagement_scene_linear_to_display_v3(rgba, display); } + mul_v3_v3(rgba, brush_rgb); } else { copy_v3_v3(rgba, brush_rgb); @@ -485,11 +482,11 @@ static void brush_painter_imbuf_update(BrushPainter *painter, ImBuf *oldtexibuf, if (is_texbrush) { brush_imbuf_tex_co(&tex_mapping, x, y, texco); BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool); - mul_v3_v3(rgba, brush_rgb); /* TODO(sergey): Support texture paint color space. */ if (!use_float) { IMB_colormanagement_scene_linear_to_display_v3(rgba, display); } + mul_v3_v3(rgba, brush_rgb); } else { copy_v3_v3(rgba, brush_rgb); @@ -689,7 +686,7 @@ static void brush_painter_2d_refresh_cache(ImagePaintState *s, BrushPainter *pai bool do_partial_update_mask = false; /* invalidate case for all mapping modes */ if (brush->mask_mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) { - mask_rotation += ups->brush_rotation; + mask_rotation += ups->brush_rotation_sec; } else if (brush->mask_mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM) { renew_maxmask = true; |