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:
authorPhilipp Oeser <info@graphics-engineer.com>2019-03-08 17:53:38 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-03-11 16:36:22 +0300
commit4302342287b56e6b47930eec7db55625c3589327 (patch)
tree3be6e6b6096f39018c33f1e58bad76237018abd8 /source/blender/editors/sculpt_paint/paint_image.c
parentf60896454929080ae775a7143c30722788ab83df (diff)
Fix T62359: Flip colors for Fill Tool missing
Reviewers: brecht Maniphest Tasks: T62359 Differential Revision: https://developer.blender.org/D4486
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 9101f65dc05..5e3d01d7f6a 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -585,8 +585,12 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
else {
if (pop->mode == PAINT_MODE_2D) {
float color[3];
-
- srgb_to_linearrgb_v3_v3(color, BKE_brush_color_get(scene, brush));
+ if (paint_stroke_inverted(stroke)) {
+ srgb_to_linearrgb_v3_v3(color, BKE_brush_secondary_color_get(scene, brush));
+ }
+ else {
+ srgb_to_linearrgb_v3_v3(color, BKE_brush_color_get(scene, brush));
+ }
paint_2d_bucket_fill(C, color, brush, pop->prevmouse, pop->custom_paint);
}
else {
@@ -1196,7 +1200,7 @@ static bool brush_colors_flip_poll(bContext *C)
{
if (image_paint_poll(C)) {
Brush *br = image_paint_brush(C);
- if (br->imagepaint_tool == PAINT_TOOL_DRAW)
+ if (ELEM(br->imagepaint_tool, PAINT_TOOL_DRAW, PAINT_TOOL_FILL))
return true;
}
else {