diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-06-18 22:40:58 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-06-18 22:41:30 +0400 |
commit | 79634b4688ee8c66216adde841bb319e655e42c6 (patch) | |
tree | 47a2782db383c67d7416de53a8b7900193b123cf /source/blender | |
parent | 4baa2fdcfe2faabe6acd333926ac957ab8b165d2 (diff) |
Fix T40637, jittering can cause the mesh to disappear.
Do not do a step when there is no collision of the brush with the mesh.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 7b9121446f5..93408586704 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -336,8 +336,13 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const float } /* TODO: can remove the if statement once all modes have this */ - if (stroke->get_location) - stroke->get_location(C, location, mouse_out); + if (stroke->get_location) { + if (!stroke->get_location(C, location, mouse_out)) { + if (ar && (paint->flags & PAINT_SHOW_BRUSH)) + WM_paint_cursor_tag_redraw(window, ar); + return; + } + } else zero_v3(location); @@ -794,7 +799,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->type != INBETWEEN_MOUSEMOVE) if (redraw && stroke->redraw) stroke->redraw(C, stroke, false); - + return OPERATOR_RUNNING_MODAL; } |