From 95bfe697045dd97d551e4957883e2dd4ad90003a Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Fri, 20 Sep 2013 12:50:34 +0000 Subject: 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. --- source/blender/bmesh/tools/bmesh_bevel.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/bmesh/tools') 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; -- cgit v1.2.3