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:
authorSebastian Parborg <zeddb>2019-01-04 00:02:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-04 00:07:41 +0300
commit5958dd4098e74d58665629bf341396ab82ca5b02 (patch)
treeebc36c58d17740ee0ca42c6a281fe501c9500d46 /source/blender/editors/sculpt_paint/paint_image.c
parent01244036afd560a58e27b186cc6e6676fe0aaebf (diff)
Fix T60101: vertex paint color sample
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 30efcd2cb9a..b8ac4403e1d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -302,7 +302,7 @@ static bool image_paint_poll(bContext *C)
return image_paint_poll_ex(C, true);
}
-static bool image_paint_ignore_tool_poll(bContext *C)
+static bool image_paint_poll_ignore_tool(bContext *C)
{
return image_paint_poll_ex(C, false);
}
@@ -1022,6 +1022,11 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
+static bool sample_color_poll(bContext *C)
+{
+ return (image_paint_poll_ignore_tool(C) || vertex_paint_poll_ignore_tool(C));
+}
+
void PAINT_OT_sample_color(wmOperatorType *ot)
{
/* identifiers */
@@ -1033,7 +1038,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
ot->exec = sample_color_exec;
ot->invoke = sample_color_invoke;
ot->modal = sample_color_modal;
- ot->poll = image_paint_ignore_tool_poll;
+ ot->poll = sample_color_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;