[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60447] trunk/blender/source/blender/ editors/sculpt_paint/paint_image.c: Fix "Sample Color" not working in vertex paint mode.

Shinsuke Irie irieshinsuke at yahoo.co.jp
Mon Sep 30 18:18:56 CEST 2013


Revision: 60447
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60447
Author:   irie
Date:     2013-09-30 16:18:56 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2013-09-30 15:27:45 UTC (rev 60446)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2013-09-30 16:18:56 UTC (rev 60447)
@@ -963,6 +963,11 @@
 	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 @@
 	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;




More information about the Bf-blender-cvs mailing list