Revision: 38584
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38584
Author:   psy-fi
Date:     2011-07-21 20:13:39 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
smart stitch
============================
-smart stitch: Bug fix: could lose island index if UvElement->next was NULL.
-remove some nneeded code

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/mesh/editmesh_lib.c
    branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c

Modified: branches/soc-2011-onion/source/blender/editors/mesh/editmesh_lib.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/mesh/editmesh_lib.c  
2011-07-21 20:12:09 UTC (rev 38583)
+++ branches/soc-2011-onion/source/blender/editors/mesh/editmesh_lib.c  
2011-07-21 20:13:39 UTC (rev 38584)
@@ -2485,7 +2485,7 @@
                if(vmap->buf[i].island == INVALID_ISLAND){
                        vmap->buf[i].island = nislands;
                        stack[0] = vmap->buf[i].face;
-                       stack[0]->tmp.l = 0;
+                       stack[0]->tmp.l = nislands;
                        stacksize=1;
 
                        while(stacksize > 0){
@@ -2544,9 +2544,9 @@
                UvElement *element = vmap->buf[i].next;
                if(element == NULL){
                        islandbuf[map[i]].next = NULL;
-                       continue;
+               } else {
+                       islandbuf[map[i]].next = &islandbuf[map[element - 
vmap->buf]];
                }
-               islandbuf[map[i]].next = &islandbuf[map[element - vmap->buf]];
                if(islandbuf[i].island != j){
                        j++;
                        vmap->islandIndices[j] = i;

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-21 20:12:09 UTC (rev 38583)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c  
2011-07-21 20:13:39 UTC (rev 38584)
@@ -1418,7 +1418,7 @@
        }
 
        /* Make face array and initialize position in preview buffer */
-       for(editFace = state->em->faces.first, i = 0; editFace; editFace = 
editFace->next, i++){
+       for(editFace = state->em->faces.first; editFace; editFace = 
editFace->next){
                editFace->tmp.l = -1;
        }
 
@@ -1504,7 +1504,6 @@
                                                {
                                                        /* add original face to 
preview */
                                                        if(state->snapIslands){
-                                                               
//island_stitch_data[el_iter->island].numOfElements++;
                                                                
island_stitch_data[element->island].addedForPreview = 1;
                                                        }
                                                        else {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to