[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31772] branches/soc-2010-nicolasbishop/ source/blender/editors/sculpt_paint/paint_ptex.c: == Ptex ==

Nicholas Bishop nicholasbishop at gmail.com
Mon Sep 6 02:07:02 CEST 2010


Revision: 31772
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31772
Author:   nicholasbishop
Date:     2010-09-06 02:07:01 +0200 (Mon, 06 Sep 2010)

Log Message:
-----------
== Ptex ==

* Fix blur tool on mesh border

Modified Paths:
--------------
    branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_ptex.c

Modified: branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_ptex.c
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_ptex.c	2010-09-05 20:28:41 UTC (rev 31771)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_ptex.c	2010-09-06 00:07:01 UTC (rev 31772)
@@ -242,25 +242,31 @@
 	/* fill in borders with adjacent data */
 	for(i = 0; i < 4; ++i) {
 		DMGridAdjacency *adj = &grid_adj[grid_index];
+		char *t1, *t2;
+		float step2_fac;
+		int j, len1, len2, step1, step2;
 
+		ptex_get_edge_iter(mptex, &grid_face_map[grid_index], out,
+				   layersize, i, 1, &t1, &len1, &step1);
+
 		if(adj->index[i] == -1) {
-			/* TODO: mesh boundary, just repeat existing border */
+			/* mesh boundary, just repeat existing border */
+			ptex_get_edge_iter(mptex, &grid_face_map[grid_index],
+					   NULL, layersize, i, 0,
+					   &t2, &len2, &step2);
 		}
 		else {
-			char *t1, *t2;
-			float step2_fac;
-			int j, len1, len2, step1, step2;
+			ptex_get_edge_iter(mptex, &grid_face_map[adj->index[i]],
+					   NULL, layersize, adj->rotation[i], 0,
+					   &t2, &len2, &step2);
+		}
 
-			ptex_get_edge_iter(mptex, &grid_face_map[grid_index], out, layersize, i, 1, &t1, &len1, &step1);
-			ptex_get_edge_iter(mptex, &grid_face_map[adj->index[i]], NULL, layersize, adj->rotation[i], 0, &t2, &len2, &step2);
+		step2_fac = (float)len2 / (float)len1;
 
-			step2_fac = (float)len2 / (float)len1;
-
-			for(j = 0; j < len1; ++j) {
-				memcpy(t1 + step1 * j,
-				       t2 + step2*(int)(step2_fac*j),
-				       layersize);
-			}
+		for(j = 0; j < len1; ++j) {
+			memcpy(t1 + step1 * j,
+			       t2 + step2*(int)(step2_fac*j),
+			       layersize);
 		}
 	}
 





More information about the Bf-blender-cvs mailing list