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:
authorIrie Shinsuke <irieshinsuke@yahoo.co.jp>2013-09-30 20:18:56 +0400
committerIrie Shinsuke <irieshinsuke@yahoo.co.jp>2013-09-30 20:18:56 +0400
commitaec701721184c711a54632a0849ba9d8386f52d4 (patch)
tree2622ea82387551304a1c8839fec4f3d8a32c9b75 /source/blender/editors/sculpt_paint
parent06c6d3235caf9001c5be5318a30261728cf71466 (diff)
Fix "Sample Color" not working in vertex paint mode.
The issue was discussed at blender.org forum: http://www.blender.org/forum/viewtopic.php?t=28158
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index a32293ab12b..910a49a8f7d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -963,6 +963,11 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
+static int sample_color_poll(bContext *C)
+{
+ return (image_paint_poll(C) || vertex_paint_poll(C));
+}
+
void PAINT_OT_sample_color(wmOperatorType *ot)
{
/* identifiers */
@@ -974,7 +979,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_poll;
+ ot->poll = sample_color_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;