diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2013-09-20 16:50:34 +0400 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2013-09-20 16:50:34 +0400 |
commit | 95bfe697045dd97d551e4957883e2dd4ad90003a (patch) | |
tree | fb70a1e5b346bd56012fe20768cbb1d7436e24f1 /source | |
parent | cdc2cf4fd3460d48f8613d08001249ccbfec515e (diff) |
Let vertex bevel work on boundary verts of polys.
Suggestion by Jonathan Williamson, and thanks to
Walid Shouman for noticing that the existing code
worked if a test to prohibit it were removed.
Limitation: treats segments > 1 the same as
segments == 1 in this case; a TODO to do
something more intelligent.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index adeb3fdc630..1463b3155c0 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -900,7 +900,12 @@ static void build_boundary(BevelParams *bp, BevVert *bv) BLI_assert(vm->count >= 2); if (bp->vertex_only) { - vm->mesh_kind = bp->seg > 1 ? M_ADJ_SUBDIV : M_POLY; + if (vm->count == 2) + vm->mesh_kind = M_NONE; + else if (bp->seg > 1) + vm->mesh_kind = M_ADJ_SUBDIV; + else + vm->mesh_kind = M_POLY; } else if (vm->count == 2 && bv->edgecount == 3) { vm->mesh_kind = M_NONE; @@ -1962,7 +1967,7 @@ static void bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v) if (!first_bme) first_bme = v->e; - if ((nsel == 0 && !bp->vertex_only) || (ntot < 3 && bp->vertex_only)) { + if ((nsel == 0 && !bp->vertex_only) || (ntot < 2 && bp->vertex_only)) { /* signal this vert isn't being beveled */ BM_elem_flag_disable(v, BM_ELEM_TAG); return; |