[Bf-blender-cvs] [0961926] soc-2013-paint: Fix T40128, curve operators "leaked" in non-paint modes
Antony Riakiotakis
noreply at git.blender.org
Sat May 10 17:37:17 CEST 2014
Commit: 0961926d4eeb0fdd57fa0d1e63e7d46253e20d01
Author: Antony Riakiotakis
Date: Sat May 10 18:36:59 2014 +0300
https://developer.blender.org/rB0961926d4eeb0fdd57fa0d1e63e7d46253e20d01
Fix T40128, curve operators "leaked" in non-paint modes
===================================================================
M source/blender/editors/sculpt_paint/paint_curve.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index b1568f6..d33cec2 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -49,9 +49,11 @@
int paintcurve_poll(bContext *C)
{
+ Object *ob = CTX_data_active_object(C);
Paint *p = BKE_paint_get_active_from_context(C);
- if (p && p->brush && (p->brush->flag & BRUSH_CURVE)) {
+ if (ob && (ob->mode & OB_MODE_ALL_PAINT) &&
+ p && p->brush && (p->brush->flag & BRUSH_CURVE)) {
return true;
}
More information about the Bf-blender-cvs
mailing list