[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43184] branches/soc-2011-onion-uv-tools/ source/blender/editors/uvedit/uvedit_smart_stitch.c: no self stitching of static island when stitching

Antony Riakiotakis kalast at gmail.com
Thu Jan 5 23:25:15 CET 2012


Revision: 43184
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43184
Author:   psy-fi
Date:     2012-01-05 22:25:14 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
no self stitching of static island when stitching

Modified Paths:
--------------
    branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_smart_stitch.c

Modified: branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-01-05 22:14:38 UTC (rev 43183)
+++ branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-01-05 22:25:14 UTC (rev 43184)
@@ -520,7 +520,8 @@
 
 				if(fabs(mtface_orig->uv[element->tfindex][0] - mtface_iter->uv[element_iter->tfindex][0]) < state->limit_dist
 						&& fabs(mtface_orig->uv[element->tfindex][1] - mtface_iter->uv[element_iter->tfindex][1]) < state->limit_dist){
-					if((element_iter->island == state->static_island) || (element->island == state->static_island)){
+					if(((element_iter->island == state->static_island) || (element->island == state->static_island)) &&
+							!((element_iter->island == element->island) && state->snap_islands)){
 						element->flag |= STITCH_STITCHABLE;
 						preview->num_stitchable++;
 						stitch_setup_face_preview_for_uv_group(element, state, island_stitch_data);
@@ -528,7 +529,8 @@
 					}
 				}
 			}else{
-				if((element_iter->island == state->static_island) || (element->island == state->static_island)){
+				if(((element_iter->island == state->static_island) || (element->island == state->static_island)) &&
+						!((element_iter->island == element->island) && state->snap_islands)){
 					element->flag |= STITCH_STITCHABLE;
 					preview->num_stitchable++;
 					stitch_setup_face_preview_for_uv_group(element, state, island_stitch_data);
@@ -707,7 +709,7 @@
 	final_position = MEM_callocN(state->selection_size*sizeof(*final_position), "stitch_uv_average");
 	uvfinal_map = MEM_mallocN(state->em->totvert*sizeof(*uvfinal_map), "stitch_uv_final_map");
 
-	/* first pass, calculate final position for stitchable uvs */
+	/* first pass, calculate final position for stitchable uvs of the static island */
 	for(i = 0; i < state->selection_size; i++){
 		UvElement *element = state->selection_stack[i];
 		if(element->flag & STITCH_STITCHABLE){



More information about the Bf-blender-cvs mailing list