Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-05-07 19:32:35 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-07 19:32:35 +0300
commit0a82c3cfefa64a7c0bdafb4ef34600142e411616 (patch)
tree5bcb9beace8bee033f19ba6f2107800bb2a5f0ff /source/blender/editors/sculpt_paint/paint_stroke.c
parenta5dead2e8cee27c33771f7d74020ef9e15beceee (diff)
Minor cleanup
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c7
1 files 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));
}
}