diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-02 01:56:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-02 01:56:59 +0400 |
commit | d0ce73c5483af62b79b4c5f3f754a26e2494c97d (patch) | |
tree | d49cc868a93b4d177e29b99bd42b78fcfdbc6085 /source/blender/editors/mesh/mesh_data.c | |
parent | 3d845b4a173fd8c25adb1f28e3ef61c8837562dd (diff) |
fix [#35939] [Edit - Vertex mode] [Select]-[Mirror] did not returns right result.
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index d0869a30cbf..21fe51c03ef 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -1244,12 +1244,30 @@ void ED_mesh_calc_tessface(Mesh *mesh) } } -void ED_mesh_report_mirror(wmOperator *op, int totmirr, int totfail) +void ED_mesh_report_mirror_ex(wmOperator *op, int totmirr, int totfail, + char selectmode) { + const char *elem_type; + + if (selectmode & SCE_SELECT_VERTEX) { + elem_type = "vertices"; + } + else if (selectmode & SCE_SELECT_EDGE) { + elem_type = "edges"; + } + else { + elem_type = "faces"; + } + if (totfail) { - BKE_reportf(op->reports, RPT_WARNING, "%d vertices mirrored, %d failed", totmirr, totfail); + BKE_reportf(op->reports, RPT_WARNING, "%d %s mirrored, %d failed", totmirr, elem_type, totfail); } else { - BKE_reportf(op->reports, RPT_INFO, "%d vertices mirrored", totmirr); + BKE_reportf(op->reports, RPT_INFO, "%d %s mirrored", totmirr, elem_type); } } + +void ED_mesh_report_mirror(wmOperator *op, int totmirr, int totfail) +{ + ED_mesh_report_mirror_ex(op, totmirr, totfail, SCE_SELECT_VERTEX); +} |