diff options
author | Matt Ebb <matt@mke3.net> | 2009-09-18 07:11:17 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-09-18 07:11:17 +0400 |
commit | bf6f23ff5f8af6ae28b5efa113b5b628ad2edb6b (patch) | |
tree | 9ed96f6ffea10ee0bb76e3a5db108e1c27ef6b81 /source/blender/editors/sculpt_paint/paint_image.c | |
parent | a393a9c6f05b66692fbbb7ae2a3f101744e550f0 (diff) |
* Added notifiers/redraws for brush edits in 3d view and image editor (so using radial control updates tool properties)
* Changed the non-projection paint code to use the brush falloff curve, rather than a predefined falloff. This makes non-projection painting in the 3d view, and image editor painting much more consistent with other brush usage.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 870b66cdbbd..e8dd27f1bd2 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -4897,12 +4897,15 @@ static int paint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *even static int paint_radial_control_exec(bContext *C, wmOperator *op) { + Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint); float zoom; int ret; char str[256]; get_imapaint_zoom(C, &zoom, &zoom); - ret = brush_radial_control_exec(op, paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint), 2.0 / zoom); + ret = brush_radial_control_exec(op, brush, 2.0 / zoom); WM_radial_control_string(op, str, 256); + + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); return ret; } @@ -5216,10 +5219,13 @@ static int texture_paint_radial_control_invoke(bContext *C, wmOperator *op, wmEv static int texture_paint_radial_control_exec(bContext *C, wmOperator *op) { - int ret = brush_radial_control_exec(op, paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint), 2); + Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint); + int ret = brush_radial_control_exec(op, brush, 2); char str[256]; WM_radial_control_string(op, str, 256); + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + return ret; } |