Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-24 23:31:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-24 23:31:58 +0400
commit19496ab62a55a02e930eff3d7b735d9540bf01dd (patch)
tree7bddd9047de695126bb83b0435a342800f27c706 /source/blender/bmesh/operators/bmo_subdivide.c
parentcdac157f4cc40cf6805038637ee2258f894a4a1a (diff)
internal bmesh api change: BM_elem_attrs_copy() no longer copies the selection flag.
this was slowing down modifiers since the selection flags would be copied and flushed to connected geometry.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_subdivide.c')
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index 6b55d5ea877..d0b23c3cdfb 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -1203,24 +1203,22 @@ void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
BMO_op_exec(bm, &op);
- if (seltype == SUBDIV_SELECT_INNER) {
- BMOIter iter;
- BMElem *ele;
-
- for (ele = BMO_iter_new(&iter, op.slots_out, "geom_inner.out", BM_EDGE | BM_VERT); ele; ele = BMO_iter_step(&iter)) {
- BM_elem_select_set(bm, ele, true);
- }
- }
- else if (seltype == SUBDIV_SELECT_LOOPCUT) {
- BMOIter iter;
- BMElem *ele;
-
- /* deselect input */
- BM_mesh_elem_hflag_disable_all(bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT, false);
-
- for (ele = BMO_iter_new(&iter, op.slots_out, "geom_inner.out", BM_EDGE); ele; ele = BMO_iter_step(&iter)) {
- BM_edge_select_set(bm, (BMEdge *)ele, true);
- }
+ switch (seltype) {
+ case SUBDIV_SELECT_NONE:
+ break;
+ case SUBDIV_SELECT_ORIG:
+ /* set the newly created data to be selected */
+ BMO_slot_buffer_hflag_enable(bm, op.slots_out, "geom_inner.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
+ BM_mesh_select_flush(bm);
+ break;
+ case SUBDIV_SELECT_INNER:
+ BMO_slot_buffer_hflag_enable(bm, op.slots_out, "geom_inner.out", BM_EDGE | BM_VERT, BM_ELEM_SELECT, true);
+ break;
+ case SUBDIV_SELECT_LOOPCUT:
+ /* deselect input */
+ BM_mesh_elem_hflag_disable_all(bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT, false);
+ BMO_slot_buffer_hflag_enable(bm, op.slots_out, "geom_inner.out", BM_EDGE, BM_ELEM_SELECT, true);
+ break;
}
BMO_op_finish(bm, &op);