- remove edge collapse loop operator (now replaced by dissolve).

- fix missing null pointer check from own recent changes.
- add asserts if BLI path functions are given wrong id's
This commit is contained in:
Campbell Barton 2013-06-27 01:10:19 +00:00
parent 46808dd22c
commit bb42703ea3
5 changed files with 17 additions and 40 deletions

@ -1222,6 +1222,9 @@ const char *BLI_get_folder(int folder_id, const char *subfolder)
if (get_path_local(path, "python", subfolder, ver)) break; if (get_path_local(path, "python", subfolder, ver)) break;
if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON", ver)) break; if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON", ver)) break;
return NULL; return NULL;
default:
BLI_assert(0);
} }
return path; return path;
@ -1248,6 +1251,8 @@ const char *BLI_get_user_folder_notest(int folder_id, const char *subfolder)
case BLENDER_USER_SCRIPTS: case BLENDER_USER_SCRIPTS:
get_path_user(path, "scripts", subfolder, "BLENDER_USER_SCRIPTS", ver); get_path_user(path, "scripts", subfolder, "BLENDER_USER_SCRIPTS", ver);
break; break;
default:
BLI_assert(0);
} }
if ('\0' == path[0]) { if ('\0' == path[0]) {
return NULL; return NULL;

@ -2392,6 +2392,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
EDBM_selectmode_flush(em); EDBM_selectmode_flush(em);
ele = BM_mesh_active_elem_get(em->bm); ele = BM_mesh_active_elem_get(em->bm);
if (ele) {
switch (ele->head.htype) { switch (ele->head.htype) {
case BM_VERT: case BM_VERT:
*r_eve = (BMVert *)ele; *r_eve = (BMVert *)ele;
@ -2403,6 +2404,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
*r_efa = (BMFace *)ele; *r_efa = (BMFace *)ele;
return; return;
} }
}
if (em->selectmode & SCE_SELECT_VERTEX) { if (em->selectmode & SCE_SELECT_VERTEX) {
BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) { BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {

@ -407,34 +407,6 @@ void MESH_OT_edge_collapse(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
} }
static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (!EDBM_op_callf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT))
return OPERATOR_CANCELLED;
EDBM_update_generic(em, true, true);
return OPERATOR_FINISHED;
}
void MESH_OT_edge_collapse_loop(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Edge Collapse Loop";
ot->description = "Collapse selected edge loops";
ot->idname = "MESH_OT_edge_collapse_loop";
/* api callbacks */
ot->exec = edbm_collapse_edge_loop_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int edbm_add_edge_face__smooth_get(BMesh *bm) static int edbm_add_edge_face__smooth_get(BMesh *bm)
{ {
BMEdge *e; BMEdge *e;

@ -180,7 +180,6 @@ void MESH_OT_colors_rotate(struct wmOperatorType *ot);
void MESH_OT_colors_reverse(struct wmOperatorType *ot); void MESH_OT_colors_reverse(struct wmOperatorType *ot);
void MESH_OT_delete(struct wmOperatorType *ot); void MESH_OT_delete(struct wmOperatorType *ot);
void MESH_OT_edge_collapse(struct wmOperatorType *ot); void MESH_OT_edge_collapse(struct wmOperatorType *ot);
void MESH_OT_edge_collapse_loop(struct wmOperatorType *ot);
void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot); void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot);
void MESH_OT_faces_shade_flat(struct wmOperatorType *ot); void MESH_OT_faces_shade_flat(struct wmOperatorType *ot);
void MESH_OT_split(struct wmOperatorType *ot); void MESH_OT_split(struct wmOperatorType *ot);

@ -119,7 +119,6 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_delete); WM_operatortype_append(MESH_OT_delete);
WM_operatortype_append(MESH_OT_edge_collapse); WM_operatortype_append(MESH_OT_edge_collapse);
WM_operatortype_append(MESH_OT_edge_collapse_loop);
WM_operatortype_append(MESH_OT_separate); WM_operatortype_append(MESH_OT_separate);
WM_operatortype_append(MESH_OT_dupli_extrude_cursor); WM_operatortype_append(MESH_OT_dupli_extrude_cursor);