diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-16 20:04:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-16 20:04:12 +0400 |
commit | 12a8c19956815cda832c87761923f573a4d6b8d3 (patch) | |
tree | 41bda681a3653d3eb1ab812d483af95220c685de /source/blender/bmesh/intern/bmesh_opdefines.c | |
parent | 617cdb4642019f57ee657105a2a1307dcceedbdf (diff) |
un-subdivide bmesh operator, useful for making lower polygon versions of models, can give nicer results then edge collapsing which tends to give a lot of sharp triangles.
works on edges and faces, has iteration option to further reduce the poly count.
access from the edge menu, under subdivide.
example: http://www.graphicall.org/ftp/ideasman42/bmesh_unsubdivide.png
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index f50de0d6ee4..407e7caae0f 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -698,6 +698,15 @@ static BMOpDefine bmo_triangulate_def = { BMO_OP_FLAG_UNTAN_MULTIRES }; +static BMOpDefine bmo_unsubdivide_def = { + "unsubdivide", + {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertices */ + {BMO_OP_SLOT_INT, "iterations"}, + {0} /* null-terminating sentinel */}, + bmo_unsubdivide_exec, + BMO_OP_FLAG_UNTAN_MULTIRES +}; + static BMOpDefine bmo_subdivide_edges_def = { "subdivide_edges", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, @@ -1274,6 +1283,7 @@ BMOpDefine *opdefines[] = { &bmo_translate_def, &bmo_triangle_fill_def, &bmo_triangulate_def, + &bmo_unsubdivide_def, &bmo_weld_verts_def, &bmo_wireframe_def, |