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
path: root/source
diff options
context:
space:
mode:
authorThomas Beck <software@plasmasolutions.de>2018-04-19 01:03:51 +0300
committerThomas Beck <software@plasmasolutions.de>2018-04-19 01:03:51 +0300
commit7c415e6fd7b42cbe9ae06e8354e0d8bf510d80da (patch)
tree9ee4b6fdeb88c2b76e37589d74fa85b0aafe10c7 /source
parent07774d48605f6208d9fb4994eb227934030a5ebf (diff)
Edit Mesh: multi-object support for 'Vertices Only' extrusion (Alt+E)
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 6541f56de56..bedb3b614d1 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -446,12 +446,24 @@ void MESH_OT_extrude_region(wmOperatorType *ot)
static int edbm_extrude_verts_exec(bContext *C, wmOperator *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);
- edbm_extrude_verts_indiv(em, op, BM_ELEM_SELECT);
- EDBM_update_generic(em, true, true);
+ for (uint ob_index = 0; ob_index < objects_len; ob_index++)
+ {
+ Object *obedit = objects[ob_index];
+ BMEditMesh *em = BKE_editmesh_from_object(obedit);
+ if (em->bm->totvertsel == 0) {
+ continue;
+ }
+
+ edbm_extrude_verts_indiv(em, op, BM_ELEM_SELECT);
+
+ EDBM_update_generic(em, true, true);
+ }
+ MEM_freeN(objects);
return OPERATOR_FINISHED;
}