* Remove Doubles was missing the info how many vertices were removed, added that back.
This commit is contained in:
Thomas Dinges 2012-02-19 20:29:04 +00:00
parent 0fd176e03d
commit 56e41a3ef0

@ -2195,13 +2195,13 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
Object *obedit = CTX_data_edit_object(C); Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = ((Mesh *)obedit->data)->edit_btmesh; BMEditMesh *em = ((Mesh *)obedit->data)->edit_btmesh;
BMOperator bmop; BMOperator bmop;
/* int count; */ /* UNUSED */ int count;
EDBM_InitOpf(em, &bmop, op, "finddoubles verts=%hv dist=%f", EDBM_InitOpf(em, &bmop, op, "finddoubles verts=%hv dist=%f",
BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist")); BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist"));
BMO_op_exec(em->bm, &bmop); BMO_op_exec(em->bm, &bmop);
/* count = BMO_slot_map_count(em->bm, &bmop, "targetmapout"); */ /* UNUSED */ count = BMO_slot_map_count(em->bm, &bmop, "targetmapout");
if (!EDBM_CallOpf(em, op, "weldverts targetmap=%s", &bmop, "targetmapout")) { if (!EDBM_CallOpf(em, op, "weldverts targetmap=%s", &bmop, "targetmapout")) {
BMO_op_finish(em->bm, &bmop); BMO_op_finish(em->bm, &bmop);
@ -2212,15 +2212,8 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
/* we need a better way of reporting this, since this doesn't work BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count==1)?"ex":"ices");
* with the last operator panel correctly.
if (count)
{
sprintf(msg, "Removed %d vertices", count);
BKE_report(op->reports, RPT_INFO, msg);
}
*/
DAG_id_tag_update(obedit->data, OB_RECALC_DATA); DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);