Revision: 37195
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37195
Author:   joeedh
Date:     2011-06-05 00:54:14 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
=bmesh= fixed an edgesplit bug

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c

Modified: branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2011-06-05 00:10:20 UTC (rev 37194)
+++ branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2011-06-05 00:54:14 UTC (rev 37195)
@@ -2696,9 +2696,9 @@
                else BM_SetIndex(e, 0);
        }
 
-       /*handle case of one vert selected.  we identify
-         the closest edge around that vert to the mouse cursor,
-         then rip the two adjacent edges in the vert fan.*/
+       /*handle case of one vert selected.  identify
+         closest edge around that vert to mouse cursor,
+         then rip two adjacent edges in the vert fan.*/
        if (em->bm->totvertsel == 1 && em->bm->totedgesel == 0 && 
em->bm->totfacesel == 0) {
                singlesel = 1;
 

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c      
2011-06-05 00:10:20 UTC (rev 37194)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c      
2011-06-05 00:54:14 UTC (rev 37195)
@@ -72,12 +72,13 @@
        
        em = CDDM_To_BMesh(ob, dm, NULL);
        bm = em->bm;
-       
+
+       BM_Compute_Normals(bm); 
        BMO_push(bm, NULL);
        
        if (emd->flags & MOD_EDGESPLIT_FROMANGLE) {
                BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, l) {
+                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                                float edge_angle_cos;
                                
                                if (l->radial_next == l)
@@ -91,9 +92,11 @@
                }
        }
        
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
-               if (BM_TestHFlag(e, BM_SHARP))
-                       BMO_SetFlag(bm, e, EDGE_MARK);
+       if (emd->flags & MOD_EDGESPLIT_FROMFLAG) {
+               BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       if (BM_TestHFlag(e, BM_SHARP))
+                               BMO_SetFlag(bm, e, EDGE_MARK);
+               }
        }
        
        BMO_CallOpf(bm, "edgesplit edges=%fe", EDGE_MARK);

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

Reply via email to