workaround for vertex bevel modifier failing since the BMesh update.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 24 Apr 2012 05:02:53 +0000 (05:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 24 Apr 2012 05:02:53 +0000 (05:02 +0000)
source/blender/bmesh/tools/BME_bevel.c

index 0a38b50afae571da4b618dfe359f77b2583463ad..0f3cb7c90f72f839950d52b03b09e9659362fb66 100644 (file)
@@ -62,6 +62,9 @@
  * so I need to decide what to do in these cases.
  */
 
+/* BMESH_TODO - resolve this */
+#define BMESH_263_VERT_BEVEL_WORKAROUND
+
 /* ------- Bevel code starts here -------- */
 
 BME_TransData_Head *BME_init_transdata(int bufsize)
@@ -660,10 +663,15 @@ static BMFace *BME_bevel_poly(BMesh *bm, BMFace *f, float value, int options, BM
 
        /* find a good normal for this face (there's better ways, I'm sure) */
        BM_ITER_ELEM (l, &iter, f, BM_LOOPS_OF_FACE) {
+#ifdef BMESH_263_VERT_BEVEL_WORKAROUND
+               add_newell_cross_v3_v3v3(up_vec, l->prev->v->co, l->v->co);
+#else
                BME_bevel_get_vec(vec1, l->v, l->next->v, td);
                BME_bevel_get_vec(vec2, l->prev->v, l->v, td);
                cross_v3_v3v3(vec3, vec2, vec1);
                add_v3_v3(up_vec, vec3);
+
+#endif
        }
        normalize_v3(up_vec);