Commit: 79634b4688ee8c66216adde841bb319e655e42c6
Author: Antony Riakiotakis
Date:   Wed Jun 18 21:40:58 2014 +0300
https://developer.blender.org/rB79634b4688ee8c66216adde841bb319e655e42c6

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.

===================================================================

M       source/blender/editors/sculpt_paint/paint_stroke.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c 
b/source/blender/editors/sculpt_paint/paint_stroke.c
index 7b91214..9340858 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;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to