diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2013-07-08 17:02:21 +0400 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2013-07-08 17:02:21 +0400 |
commit | 0a006cce9cdf71aa02cd5cc0b8c13d046550f217 (patch) | |
tree | d98adc008d707a511b59a2b81c0999b6cd88fecc /source/blender | |
parent | d75e0f320b4af13d5a35c5787a8ff992b959149e (diff) |
Fix bevel bugs 34445 and 35109, copying over edge data.
The bugs were about not respecting edge smoothness and
not respecting edge crease. This change copies the
edge attributes from a beveled edge to the two outside
edges of the bevel.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index d7073ef61be..e0c11414e38 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -2223,6 +2223,7 @@ static void bevel_build_edge_polygons(BMesh *bm, BevelParams *bp, BMEdge *bme) BMVert *bmv1, *bmv2, *bmv3, *bmv4, *bmv1i, *bmv2i, *bmv3i, *bmv4i; VMesh *vm1, *vm2; EdgeHalf *e1, *e2; + BMEdge *bme1, *bme2; BMFace *f1, *f2, *f; int k, nseg, i1, i2, odd, mid; @@ -2294,6 +2295,13 @@ static void bevel_build_edge_polygons(BMesh *bm, BevelParams *bp, BMEdge *bme) bev_merge_end_uvs(bm, bv1, e1); if (!e2->is_seam && bv2->vmesh->mesh_kind == M_NONE) bev_merge_end_uvs(bm, bv2, e2); + + /* Copy edge data to first and last edge */ + bme1 = BM_edge_exists(bmv1, bmv2); + bme2 = BM_edge_exists(bmv3, bmv4); + BLI_assert(bme1 && bme2); + BM_elem_attrs_copy(bm, bm, bme, bme1); + BM_elem_attrs_copy(bm, bm, bme, bme2); } /* |