[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30114] branches/soc-2010-jwilkins/source/ blender/editors/sculpt_paint: * The new rake angle is now gotten by averaging the previous and current angles .
Jason Wilkins
Jason.A.Wilkins at gmail.com
Thu Jul 8 16:02:18 CEST 2010
Revision: 30114
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30114
Author: jwilkins
Date: 2010-07-08 16:02:18 +0200 (Thu, 08 Jul 2010)
Log Message:
-----------
* The new rake angle is now gotten by averaging the previous and current angles. This filters out some jitter.
Modified Paths:
--------------
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-08 14:01:48 UTC (rev 30113)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-08 14:02:18 UTC (rev 30114)
@@ -581,7 +581,7 @@
if (dx*dx + dy*dy > 100) {
/* only update if distance traveled is more than 10 pixels */
- brush->last_angle = atan2(dx, dy);
+ brush->last_angle = (brush->last_angle + atan2(dx, dy)) / 2;
brush->last_x = x;
brush->last_y = y;
} /* else, do not update last_x and last_y so that the distance can accumulate */
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-07-08 14:01:48 UTC (rev 30113)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-07-08 14:02:18 UTC (rev 30114)
@@ -2902,7 +2902,7 @@
update = dx*dx + dy*dy > 100;
if(update && !cache->first_time)
- cache->special_rotation = atan2(dx, dy);
+ cache->special_rotation = (cache->special_rotation + atan2(dx, dy)) / 2;
if(update || cache->first_time) {
cache->last_rake[0] = cache->mouse[0];
More information about the Bf-blender-cvs
mailing list