diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-23 19:31:58 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-23 19:31:58 +0300 |
commit | 576cb479450fa176b3c71287869539a5ed46f52c (patch) | |
tree | 90f20d2a5e7779f0e2584b6a583618e502b61ca0 /source/blender/editors/sculpt_paint | |
parent | 8416db896cc88c78408c958f9e056b0ef28abb9b (diff) |
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index cf076f5d464..998e346836f 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5154,6 +5154,15 @@ static int texture_paint_radial_control_exec(bContext *C, wmOperator *op) 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 @@ void PAINT_OT_texture_paint_radial_control(wmOperatorType *ot) 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; |