From 0a82c3cfefa64a7c0bdafb4ef34600142e411616 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 7 May 2015 18:32:35 +0200 Subject: [PATCH] Minor cleanup --- source/blender/editors/sculpt_paint/paint_stroke.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index d5c3e7e7fab..21beb97ffae 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -1004,10 +1004,9 @@ static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *str } for (j = 0; j < PAINT_CURVE_NUM_SEGMENTS; j++) { - float rotation = 0.0f; if (do_rake) { - normalize_v2_v2(&tangents[2 * j], &tangents[2 * j]); - rotation = atan2f(tangents[2 * j], tangents[2 * j + 1]); + float rotation = atan2f(tangents[2 * j], tangents[2 * j + 1]); + paint_update_brush_rake_rotation(ups, br, rotation); } if (!stroke->stroke_started) { @@ -1016,13 +1015,11 @@ static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *str stroke->stroke_started = stroke->test_start(C, op, stroke->last_mouse_position); if (stroke->stroke_started) { - paint_update_brush_rake_rotation(ups, br, rotation); paint_brush_stroke_add_step(C, op, data + 2 * j, 1.0); paint_line_strokes_spacing(C, op, stroke, spacing, &length_residue, data + 2 * j, data + 2 * (j + 1)); } } else { - paint_update_brush_rake_rotation(ups, br, rotation); paint_line_strokes_spacing(C, op, stroke, spacing, &length_residue, data + 2 * j, data + 2 * (j + 1)); } }