diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-11 08:59:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-11 08:59:16 +0300 |
commit | e161c51e7f12c1c9bff3be33c1483844df3c7db6 (patch) | |
tree | 353a9f2432f5a59109b7c74a2cc29c52595b8b57 /source/blender/editors/mesh | |
parent | b5823c25f89eac1e1d14f2d98a2573db89b08c8f (diff) |
EditMesh: multi-object select_interior_faces
D3334 by @ThaRemo
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index ace82d2dfc6..3262b90f37d 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1956,18 +1956,23 @@ void MESH_OT_select_all(wmOperatorType *ot) static int edbm_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *obedit = CTX_data_edit_object(C); - BMEditMesh *em = BKE_editmesh_from_object(obedit); + ViewLayer *view_layer = CTX_data_view_layer(C); + uint objects_len = 0; + Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); - if (EDBM_select_interior_faces(em)) { - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); + for (uint ob_index = 0; ob_index < objects_len; ob_index++) { + Object *obedit = objects[ob_index]; + BMEditMesh *em = BKE_editmesh_from_object(obedit); - return OPERATOR_FINISHED; - } - else { - return OPERATOR_CANCELLED; + if (!EDBM_select_interior_faces(em)) { + continue; + } + + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); } + MEM_freeN(objects); + return OPERATOR_FINISHED; } void MESH_OT_select_interior_faces(wmOperatorType *ot) |