Revision: 38618
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38618
Author: psy-fi
Date: 2011-07-22 17:37:51 +0000 (Fri, 22 Jul 2011)
Log Message:
-----------
smart stitch
============================
-smart stitch: Bug fix: trash in preview for vert stitching.
-Maybe this can be optimized so that only one uv is drawn, however since this
incurs too small a cost leaving as is for now.
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
2011-07-22 17:02:02 UTC (rev 38617)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
2011-07-22 17:37:51 UTC (rev 38618)
@@ -1449,8 +1449,6 @@
EditVert *vt =
*(&(editFace->v1)+i);
/* ...we'll iterate through all
shared UV's of the corresponding vertex */
el_iter = vmap->vert[vt->tmp.l];
- /* Original vertex will be
previewed, of course, so increasing the preview count for original geometry */
- preview->numOfOrig++;
/* First we need the UVMapVert
that corresponds to our uv */
for(;el_iter; el_iter =
el_iter->next)
@@ -1464,6 +1462,11 @@
}
}
+ /* Add preview only if it
hasn't been added already */
+ if(!(element->flag &
(STITCH_STITCHABLE | STITCH_PROCESSED))){
+ preview->numOfOrig++;
+ }
+
uv_average[averageIndex].count
++;
uv_average[averageIndex].uv[0]
+= mt->uv[i][0];
uv_average[averageIndex].uv[1]
+= mt->uv[i][1];
@@ -1515,8 +1518,10 @@
el_iter =
commonVertMaps[iter2];
efa =
el_iter->face;
averageIndex2 =
el_iter - vmap->buf;
-
preview->numOfOrig++;
-
+ /* Add preview
only if it hasn't been added already */
+
if(!(el_iter->flag & (STITCH_STITCHABLE | STITCH_PROCESSED))){
+
preview->numOfOrig++;
+ }
el_iter->flag
|= STITCH_STITCHABLE;
//el_iter->flag
|= STITCH_PROCESSED;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs