Fix T53593: sculpt brush rake spacing bug after recent bugfix.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 24 Jan 2018 13:25:59 +0000 (14:25 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 24 Jan 2018 14:56:09 +0000 (15:56 +0100)
source/blender/editors/sculpt_paint/paint_stroke.c

index c3055144b20fd0644c5a3e697a0dbf16bb8f4e5f..40d88d4901c77e923f6140ea1fe4637983afa2d8 100644 (file)
@@ -108,6 +108,8 @@ typedef struct PaintStroke {
         * e.g. in sculpt mode, stroke doesn't start until cursor
         * passes over the mesh */
        bool stroke_started;
+       /* Set when enough motion was found for rake rotation */
+       bool rake_started;
        /* event that started stroke, for modal() return */
        int event_type;
        /* check if stroke variables have been initialized */
@@ -367,7 +369,12 @@ static bool paint_brush_update(bContext *C,
                else if (!(brush->flag & BRUSH_CURVE)) {
                        if (!paint_calculate_rake_rotation(ups, brush, mouse_init)) {
                                /* Not enough motion to define an angle. */
-                               is_dry_run = true;
+                               if(!stroke->rake_started) {
+                                       is_dry_run = true;
+                               }
+                       }
+                       else {
+                               stroke->rake_started = true;
                        }
                }
        }