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 16:03:55 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-07 16:04:11 +0300
commit15fd37fab23ad906942726162a677d9254a94be4 (patch)
treefdcaf65a2ced7e35956330e5ca80197f31598d43
parente6a7fdd3092939d4a0a1a08459c464597970427a (diff)
Rake: store last position from mouse, don't store halfpoint between last
and current position. patch by Bastien
-rw-r--r--source/blender/blenkernel/intern/paint.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 3900ba8b5ea..1284ffda0ff 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -536,7 +536,6 @@ static void update_brush_rake_rotation(UnifiedPaintSettings *ups, Brush *brush,
void paint_calculate_rake_rotation(UnifiedPaintSettings *ups, Brush *brush, const float mouse_pos[2])
{
if ((brush->mtex.brush_angle_mode & MTEX_ANGLE_RAKE) || (brush->mask_mtex.brush_angle_mode & MTEX_ANGLE_RAKE)) {
- const float u = 0.5f;
const float r = RAKE_THRESHHOLD;
float rotation;
@@ -546,8 +545,7 @@ void paint_calculate_rake_rotation(UnifiedPaintSettings *ups, Brush *brush, cons
if (len_squared_v2(dpos) >= r * r) {
rotation = atan2f(dpos[0], dpos[1]);
- interp_v2_v2v2(ups->last_rake, ups->last_rake,
- mouse_pos, u);
+ copy_v2_v2(ups->last_rake, mouse_pos);
ups->last_rake_angle = rotation;