[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39351] branches/soc-2011-onion/source: smooth brush
Antony Riakiotakis
kalast at gmail.com
Sat Aug 13 00:33:02 CEST 2011
Revision: 39351
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39351
Author: psy-fi
Date: 2011-08-12 22:33:00 +0000 (Fri, 12 Aug 2011)
Log Message:
-----------
smooth brush
============
-Remove erroneous copyright stuff from header
-Add some extra needed variable to initialization
-add ptex to blenderplayer's dependencies
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c
branches/soc-2011-onion/source/blenderplayer/CMakeLists.txt
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c 2011-08-12 21:56:08 UTC (rev 39350)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c 2011-08-12 22:33:00 UTC (rev 39351)
@@ -17,11 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2006 by Nicholas Bishop
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
* Contributor(s): Antony Riakiotakis
*
* ***** END GPL LICENSE BLOCK *****
@@ -73,6 +68,8 @@
typedef struct UvAdjacencyElement {
/* pointer to original uvelement */
UvElement *element;
+ /* uv pointer for convenience. Caution, this points to the original UVs! */
+ float *uv;
/* general use flag (Used to check if Element is boundary here) */
char flag;
} UvAdjacencyElement;
@@ -166,7 +163,6 @@
data->b[0] = diff[0] - eve->co[0];
data->b[1] = diff[1] - eve->co[1];
- data->b[2] = diff[2] - eve->co[2];
}
for (eed = em->edges.first; eed; eed = eed->next){
@@ -180,7 +176,6 @@
if (!eve->f2 && (eve->f & SELECT)){
eve->co[0] = data->p[0] - 0.5f*(data->b[0] + data->sum_b[0]/data->ncounter);
eve->co[1] = data->p[1] - 0.5f*(data->b[1] + data->sum_b[1]/data->ncounter);
- eve->co[2] = data->p[2] - 0.5f*(data->b[2] + data->sum_b[2]/data->ncounter);
}
/* clip if needed by mirror modifier */
@@ -331,6 +326,9 @@
/* Edges used for adjacency info, used with laplacian smoothing */
UvAdjacencyEdge *uvedges;
+ /* Need I say more? */
+ int totalUvEdges;
+
/* Timer to be used for airbrush-type brush */
wmTimer *timer;
@@ -459,6 +457,7 @@
UvAdjacencyEdge *edges;
GHash *edgeHash;
GHashIterator* ghi;
+ MTFace *mt;
data->uvpaint = &ts->uvsmooth->paint;
data->elementMap = EM_make_uv_element_map(em, 0, 0);
@@ -492,9 +491,13 @@
UvElement *element = data->elementMap->vert[i];
for(; element; element = element->next){
if(element->separate){
+ efa = element->face;
+ mt = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
+
numOfSeparators++;
data->uv[numOfSeparators].element = data->elementMap->buf + i;
data->uv[numOfSeparators].flag = 0;
+ data->uv[numOfSeparators].uv = mt->uv[element->tfindex];
}
/* pointer arithmetic to the rescue, as always :)*/
data->uniqueUv[element - data->elementMap->buf] = numOfSeparators;
@@ -545,6 +548,7 @@
for(i = 0; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi), i++){
data->uvedges[i] = *((UvAdjacencyEdge *)BLI_ghashIterator_getKey(ghi));
}
+ data->totalUvEdges = BLI_ghash_size(edgeHash);
BLI_ghashIterator_free(ghi);
BLI_ghash_free(edgeHash, NULL, NULL);
MEM_freeN(edges);
Modified: branches/soc-2011-onion/source/blenderplayer/CMakeLists.txt
===================================================================
--- branches/soc-2011-onion/source/blenderplayer/CMakeLists.txt 2011-08-12 21:56:08 UTC (rev 39350)
+++ branches/soc-2011-onion/source/blenderplayer/CMakeLists.txt 2011-08-12 22:33:00 UTC (rev 39351)
@@ -134,6 +134,7 @@
bf_intern_audaspace
blenkernel_blc
extern_binreloc
+ extern_ptex
extern_minilzo
bf_intern_ghost # duplicate for linking
bf_blenkernel # duplicate for linking
More information about the Bf-blender-cvs
mailing list