[Bf-blender-cvs] [1d7bdbd273a] blender2.8: Edit Mesh: multi-object extrude_region
Dalai Felinto
noreply at git.blender.org
Wed Apr 25 12:37:14 CEST 2018
Commit: 1d7bdbd273abdb6f606fac0a651986166cee62a4
Author: Dalai Felinto
Date: Wed Apr 25 12:35:36 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1d7bdbd273abdb6f606fac0a651986166cee62a4
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
===================================================================
M source/blender/editors/mesh/editmesh_extrude.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 2c60df9abe1..70fcfe8e4a5 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -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);
-
- edbm_extrude_mesh(obedit, em, op);
+ 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);
- /* 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_extrude_mesh(obedit, em, op);
- 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;
}
More information about the Bf-blender-cvs
mailing list