fix for bridge tool selection flushing (after recent api change), also exposed bug...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 05:57:20 +0000 (05:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 05:57:20 +0000 (05:57 +0000)
source/blender/bmesh/operators/bmo_subdivide_edgering.c
source/blender/editors/mesh/editmesh_tools.c

index 44d4b63f5c40c51bbb1a8c37193d1a000a842418..f69d2f27346ea8b2261588921cf7051d87a0d22a 100644 (file)
@@ -1167,6 +1167,7 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op)
                        bm_edgering_pair_ringsubd(bm, lpair, el_store_a, el_store_b,
                                                  interp_mode, cuts, smooth, falloff_cache);
                        bm_edgering_pair_store_free(lpair, interp_mode);
+                       change = true;
                }
                else {
                        BMO_error_raise(bm, op, BMERR_INVALID_SELECTION,
@@ -1217,6 +1218,7 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op)
                                bm_edgering_pair_ringsubd(bm, lpair, el_store_a, el_store_b,
                                                          interp_mode, cuts, smooth, falloff_cache);
                                bm_edgering_pair_store_free(lpair, interp_mode);
+                               change = true;
                        }
 
                        BLI_assert(bm_verts_tag_count(bm) == 0);
@@ -1229,6 +1231,6 @@ cleanup:
 
        /* flag output */
        if (change) {
-               BMO_slot_buffer_flag_enable(bm, op->slots_out, "faces.out", BM_FACE, FACE_OUT);
+               BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "faces.out", BM_FACE, FACE_OUT);
        }
 }
index 185ff1a74d57971125ab9fee344c22f331b20808..3edf25d91bc82cf205f1bd9e050c2a4486d8e9cf 100644 (file)
@@ -4034,14 +4034,23 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op)
                        mesh_operator_edgering_props_get(op, &op_props);
 
                        if (op_props.cuts) {
+                               BMOperator bmop_subd;
                                /* we only need face normals updated */
                                EDBM_mesh_normals_update(em);
 
-                               BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS,
-                                            "subdivide_edgering edges=%S interp_mode=%i cuts=%i smooth=%f "
-                                            "profile_shape=%i profile_shape_factor=%f",
-                                            &bmop, "edges.out", op_props.interp_mode, op_props.cuts, op_props.smooth,
-                                            op_props.profile_shape, op_props.profile_shape_factor);
+                               BMO_op_initf(
+                                       em->bm, &bmop_subd, op->flag,
+                                       "subdivide_edgering edges=%S interp_mode=%i cuts=%i smooth=%f "
+                                       "profile_shape=%i profile_shape_factor=%f",
+                                       &bmop, "edges.out", op_props.interp_mode, op_props.cuts, op_props.smooth,
+                                       op_props.profile_shape, op_props.profile_shape_factor
+                                       );
+                               BMO_op_exec(em->bm, &bmop_subd);
+
+                               BMO_slot_buffer_hflag_enable(em->bm, bmop_subd.slots_out, "faces.out", BM_FACE, BM_ELEM_SELECT, true);
+
+                               BMO_op_finish(em->bm, &bmop_subd);
+
                        }
                }
        }