[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53337] trunk/blender/source/blender/ editors/uvedit/uvedit_smart_stitch.c: Fix: edge uv stitch mode did not average final position of uvs in
Antony Riakiotakis
kalast at gmail.com
Thu Dec 27 04:14:18 CET 2012
Revision: 53337
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53337
Author: psy-fi
Date: 2012-12-27 03:14:11 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Fix: edge uv stitch mode did not average final position of uvs in
midpoint, non-snapping mode.
Modified Paths:
--------------
trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c 2012-12-27 02:52:45 UTC (rev 53336)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c 2012-12-27 03:14:11 UTC (rev 53337)
@@ -1164,6 +1164,14 @@
}
}
+ /* take mean position here. For edge case, this can't be done inside the loop for shared uvverts */
+ if (state->mode == STITCH_EDGE && stitch_midpoints) {
+ for (i = 0; i < state->total_separate_uvs; i++) {
+ final_position[i].uv[0] /= final_position[i].count;
+ final_position[i].uv[1] /= final_position[i].count;
+ }
+ }
+
/* second pass, calculate island rotation and translation before modifying any uvs */
if (state->snap_islands) {
if (state->mode == STITCH_VERT) {
@@ -1218,11 +1226,6 @@
for (i = 0; i < state->total_separate_uvs; i++) {
UvElement *element = state->uvs[i];
- if (stitch_midpoints) {
- final_position[i].uv[0] /= final_position[i].count;
- final_position[i].uv[1] /= final_position[i].count;
- }
-
if (element->flag & STITCH_STITCHABLE) {
BMLoop *l;
MLoopUV *luv;
More information about the Bf-blender-cvs
mailing list