[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19092] branches/blender2.5/blender/source /blender/editors/sculpt_paint/paint_image.c: 2.5

Ton Roosendaal ton at blender.org
Mon Feb 23 17:32:03 CET 2009


Revision: 19092
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19092
Author:   ton
Date:     2009-02-23 17:31:58 +0100 (Mon, 23 Feb 2009)

Log Message:
-----------
2.5

Added more strict poll() to radial control for texture paint.
I'd advise to use wherever possible G.f checks in the polls for now, 
easier to get this solved later.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c

Modified: branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c	2009-02-23 14:55:23 UTC (rev 19091)
+++ branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c	2009-02-23 16:31:58 UTC (rev 19092)
@@ -5154,6 +5154,15 @@
 	return ret;
 }
 
+static int texture_paint_poll(bContext *C)
+{
+	if(texture_paint_toggle_poll(C))
+		if(G.f & G_TEXTUREPAINT)
+			return 1;
+	
+	return 0;
+}
+
 void PAINT_OT_texture_paint_radial_control(wmOperatorType *ot)
 {
 	WM_OT_radial_control_partial(ot);
@@ -5164,7 +5173,7 @@
 	ot->invoke= texture_paint_radial_control_invoke;
 	ot->modal= paint_radial_control_modal;
 	ot->exec= texture_paint_radial_control_exec;
-	ot->poll= texture_paint_toggle_poll;
+	ot->poll= texture_paint_poll;
 	
 	/* flags */
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;





More information about the Bf-blender-cvs mailing list