[Bf-blender-cvs] [0a82c3c] master: Minor cleanup
Antony Riakiotakis
noreply at git.blender.org
Thu May 7 18:32:54 CEST 2015
Commit: 0a82c3cfefa64a7c0bdafb4ef34600142e411616
Author: Antony Riakiotakis
Date: Thu May 7 18:32:35 2015 +0200
Branches: master
https://developer.blender.org/rB0a82c3cfefa64a7c0bdafb4ef34600142e411616
Minor cleanup
===================================================================
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 d5c3e7e..21beb97 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));
}
}
More information about the Bf-blender-cvs
mailing list