UI: show a more useful error when attempting to "Join" faces
Joining faces isn't supported.
This commit is contained in:
@@ -1544,6 +1544,7 @@ static wmOperatorStatus edbm_vert_connect_path_exec(bContext *C, wmOperator *op)
|
||||
uint failed_selection_order_len = 0;
|
||||
uint failed_connect_len = 0;
|
||||
bool has_select_history_mixed = false;
|
||||
bool has_select_history_face = false;
|
||||
const Vector<Object *> objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(
|
||||
scene, view_layer, CTX_wm_view3d(C));
|
||||
|
||||
@@ -1572,6 +1573,12 @@ static wmOperatorStatus edbm_vert_connect_path_exec(bContext *C, wmOperator *op)
|
||||
failed_selection_order_len++;
|
||||
continue;
|
||||
}
|
||||
/* Faces are not supported, this check is only done to show a more useful error. */
|
||||
if (htype_selected & BM_FACE) {
|
||||
has_select_history_face = true;
|
||||
failed_selection_order_len++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bm->selected.first) {
|
||||
BMEditSelection *ese = static_cast<BMEditSelection *>(bm->selected.first);
|
||||
@@ -1609,6 +1616,9 @@ static wmOperatorStatus edbm_vert_connect_path_exec(bContext *C, wmOperator *op)
|
||||
if (has_select_history_mixed) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Could not connect mixed selection types");
|
||||
}
|
||||
else if (has_select_history_face) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Could not connect a face selection");
|
||||
}
|
||||
else {
|
||||
BKE_report(op->reports, RPT_ERROR, "Invalid selection order");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user