[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60771] trunk/blender/source/blender/ editors/sculpt_paint/paint_image_proj.c: fix [#37082] Texture paint artefact
Campbell Barton
ideasman42 at gmail.com
Tue Oct 15 10:44:13 CEST 2013
Revision: 60771
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60771
Author: campbellbarton
Date: 2013-10-15 08:44:13 +0000 (Tue, 15 Oct 2013)
Log Message:
-----------
fix [#37082] Texture paint artefact
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-10-15 08:05:57 UTC (rev 60770)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-10-15 08:44:13 UTC (rev 60771)
@@ -164,6 +164,7 @@
/* used for testing doubles, if a point is on a line etc */
#define PROJ_GEOM_TOLERANCE 0.00075f
+#define PROJ_PIXEL_TOLERANCE 0.01f
/* vert flags */
#define PROJ_VERT_CULL 1
@@ -2007,8 +2008,8 @@
/* remove doubles */
/* first/last check */
- if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE &&
- fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE)
+ if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_PIXEL_TOLERANCE &&
+ fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_PIXEL_TOLERANCE)
{
(*tot)--;
}
@@ -2024,8 +2025,8 @@
while (doubles == TRUE) {
doubles = FALSE;
for (i = 1; i < (*tot); i++) {
- if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE &&
- fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE)
+ if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_PIXEL_TOLERANCE &&
+ fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_PIXEL_TOLERANCE)
{
int j;
for (j = i + 1; j < (*tot); j++) {
More information about the Bf-blender-cvs
mailing list