[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17483] branches/etch-a-ton/source/blender /src/editarmature_sketch.c: Use grease pencil manhattan distance threshold for strokes.

Martin Poirier theeth at yahoo.com
Mon Nov 17 22:03:41 CET 2008


Revision: 17483
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17483
Author:   theeth
Date:     2008-11-17 22:03:41 +0100 (Mon, 17 Nov 2008)

Log Message:
-----------
Use grease pencil manhattan distance threshold for strokes.

Modified Paths:
--------------
    branches/etch-a-ton/source/blender/src/editarmature_sketch.c

Modified: branches/etch-a-ton/source/blender/src/editarmature_sketch.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_sketch.c	2008-11-17 20:38:04 UTC (rev 17482)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c	2008-11-17 21:03:41 UTC (rev 17483)
@@ -31,6 +31,7 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 #include "DNA_armature_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_arithb.h"
@@ -1450,7 +1451,7 @@
 int sk_stroke_filtermval(SK_DrawData *dd)
 {
 	int retval = 0;
-	if (dd->mval[0] != dd->previous_mval[0] || dd->mval[1] != dd->previous_mval[1])
+	if (ABS(dd->mval[0] - dd->previous_mval[0]) + ABS(dd->mval[1] - dd->previous_mval[1]) > U.gp_manhattendist)
 	{
 		retval = 1;
 	}





More information about the Bf-blender-cvs mailing list