Multi-Object: MESH_OT_vert_connect_concave by Guy Boicey
Maniphest Tasks: T54643 Differential Revision: https://developer.blender.org/D3255
This commit is contained in:
parent
9e4709e9a5
commit
4043e4b820
|
@ -1478,20 +1478,29 @@ void MESH_OT_vert_connect_path(wmOperatorType *ot)
|
|||
|
||||
static int edbm_vert_connect_concave_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);
|
||||
|
||||
if (!EDBM_op_call_and_selectf(
|
||||
em, op,
|
||||
"faces.out", true,
|
||||
"connect_verts_concave faces=%hf",
|
||||
BM_ELEM_SELECT))
|
||||
{
|
||||
return OPERATOR_CANCELLED;
|
||||
if (em->bm->totfacesel == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!EDBM_op_call_and_selectf(
|
||||
em, op,
|
||||
"faces.out", true,
|
||||
"connect_verts_concave faces=%hf",
|
||||
BM_ELEM_SELECT))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EDBM_update_generic(em, true, true);
|
||||
}
|
||||
|
||||
|
||||
EDBM_update_generic(em, true, true);
|
||||
MEM_freeN(objects);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue