Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2012-12-27 07:14:11 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-12-27 07:14:11 +0400
commit6586fd9c62784af5496c48e5eeebc9b128d1addd (patch)
tree805f819b2742381b20d35e12cc9393852c5a9127 /source/blender/editors/uvedit
parent540cbbc1d0bc4fcb84e35dcd3991f7ef9e9a10a1 (diff)
Fix: edge uv stitch mode did not average final position of uvs in
midpoint, non-snapping mode.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index bc2d0e493f4..f7219f8bd1b 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1164,6 +1164,14 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
}
}
+ /* 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 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
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;