Edit Mesh: multi-object extrude_region

Technically this is the following operator:
bpy.ops.view3d.edit_mesh_extrude_move_normal

But this is a Python operator that in turns calls:
MESH_OT_extrude_region_move

Which in turns calls:
* MESH_OT_extrude_region
* TRANSFORM_OT_translate
This commit is contained in:
Dalai Felinto 2018-04-25 12:35:36 +02:00
parent 7958a2b40e
commit 1d7bdbd273
Notes: blender-bot 2023-02-14 06:00:44 +01:00
Referenced by issue #54643, Multi-Object-Mode: EditMesh Tools
1 changed files with 14 additions and 9 deletions

View File

@ -405,18 +405,23 @@ static bool edbm_extrude_mesh(Object *obedit, BMEditMesh *em, wmOperator *op)
/* extrude without transform */
static int edbm_extrude_region_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);
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
edbm_extrude_mesh(obedit, em, op);
edbm_extrude_mesh(obedit, em, op);
/* This normally happens when pushing undo but modal operators
* like this one don't push undo data until after modal mode is
* done.*/
EDBM_mesh_normals_update(em);
EDBM_update_generic(em, true, true);
/* This normally happens when pushing undo but modal operators
* like this one don't push undo data until after modal mode is
* done.*/
EDBM_mesh_normals_update(em);
EDBM_update_generic(em, true, true);
}
MEM_freeN(objects);
return OPERATOR_FINISHED;
}