Let vertex bevel work on boundary verts of polys.
authorHoward Trickey <howard.trickey@gmail.com>
Fri, 20 Sep 2013 12:50:34 +0000 (12:50 +0000)
committerHoward Trickey <howard.trickey@gmail.com>
Fri, 20 Sep 2013 12:50:34 +0000 (12:50 +0000)
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

index adeb3fdc6305a295c91ac4cc11f30102f2915eec..1463b3155c0d9c02e7b059473b0223b7e8367671 100644 (file)
@@ -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;