Revision: 45360
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45360
Author:   campbellbarton
Date:     2012-04-03 06:12:04 +0000 (Tue, 03 Apr 2012)
Log Message:
-----------
fix [#30735] bmesh: loop-cut cuts faces isolated by hidden faces

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/operators/bmo_subdivide.c
    trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c

Modified: trunk/blender/source/blender/bmesh/operators/bmo_subdivide.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_subdivide.c        
2012-04-03 06:05:43 UTC (rev 45359)
+++ trunk/blender/source/blender/bmesh/operators/bmo_subdivide.c        
2012-04-03 06:12:04 UTC (rev 45360)
@@ -1023,9 +1023,9 @@
 
 /* editmesh-emulating function */
 void BM_mesh_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float 
smooth,
-                       float fractal, int beauty, int numcuts,
-                       int seltype, int cornertype, int singleedge,
-                       int gridfill, int seed)
+                            float fractal, int beauty, int numcuts,
+                            int seltype, int cornertype, int singleedge,
+                            int gridfill, int seed)
 {
        BMOperator op;
        

Modified: trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c        
2012-04-03 06:05:43 UTC (rev 45359)
+++ trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c        
2012-04-03 06:12:04 UTC (rev 45360)
@@ -206,7 +206,7 @@
        if (select) {
                BMW_init(&walker, em->bm, BMW_EDGERING,
                         BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP,
-                        BMW_FLAG_NOP, /* BMESH_TODO - should be 
BMW_FLAG_TEST_HIDDEN ? */
+                        BMW_FLAG_TEST_HIDDEN,
                         BMW_NIL_LAY);
 
                eed = BMW_begin(&walker, startedge);
@@ -220,7 +220,7 @@
 
        BMW_init(&walker, em->bm, BMW_EDGERING,
                 BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP,
-                BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? 
*/
+                BMW_FLAG_TEST_HIDDEN,
                 BMW_NIL_LAY);
 
        eed = startedge = BMW_begin(&walker, startedge);
@@ -240,6 +240,8 @@
                        edgering_find_order(em, lasteed, eed, lastv1, v);
                        lastv1 = v[0][0];
 
+                       BLI_array_growitems(edges, previewlines);
+
                        for (i = 1; i <= previewlines; i++) {
                                co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * 
(i / ((float)previewlines + 1)) + v[0][0]->co[0];
                                co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1]) * 
(i / ((float)previewlines + 1)) + v[0][0]->co[1];
@@ -249,7 +251,6 @@
                                co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1]) * 
(i / ((float)previewlines + 1)) + v[1][0]->co[1];
                                co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2]) * 
(i / ((float)previewlines + 1)) + v[1][0]->co[2];
 
-                               BLI_array_growone(edges);
                                copy_v3_v3(edges[tot][0], co[0]);
                                copy_v3_v3(edges[tot][1], co[1]);
                                tot++;
@@ -264,6 +265,8 @@
 
                edgering_find_order(em, lasteed, startedge, lastv1, v);
                
+               BLI_array_growitems(edges, previewlines);
+
                for (i = 1; i <= previewlines; i++) {
                        if (!v[0][0] || !v[0][1] || !v[1][0] || !v[1][1])
                                continue;
@@ -276,7 +279,6 @@
                        co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1]) * (i / 
((float)previewlines + 1)) + v[1][0]->co[1];
                        co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2]) * (i / 
((float)previewlines + 1)) + v[1][0]->co[2];
                        
-                       BLI_array_growone(edges);
                        copy_v3_v3(edges[tot][0], co[0]);
                        copy_v3_v3(edges[tot][1], co[1]);
                        tot++;

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

Reply via email to