Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-18 14:17:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-18 14:17:07 +0400
commit42ebc9bc8086f2c1fb1323dfe22168419ec83024 (patch)
tree14b7c7894ea450fe8c6558d70177705236f459ea /source/blender/modifiers/intern/MOD_bevel.c
parentfd9dac77d1d6de6ae6eea3ccc19099decfae665f (diff)
bmesh: move internal API flags out of BMFlagLayer, into BMHeader which was being padded up anyway, added static assert to make sure it stays <=16 bytes.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_bevel.c')
-rw-r--r--source/blender/modifiers/intern/MOD_bevel.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 7a109c041b6..cb63da659b2 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -111,7 +111,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
BMIter iter;
BMEdge *e;
BevelModifierData *bmd = (BevelModifierData *) md;
- float threshold = cosf((bmd->bevel_angle + 0.00001f) * (float)M_PI / 180.0f);
+ const float threshold = cosf((bmd->bevel_angle + 0.00001f) * (float)M_PI / 180.0f);
const int segments = 16; /* XXX */
bm = DM_to_bmesh(dm);
@@ -119,11 +119,9 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
if (bmd->lim_flags & BME_BEVEL_ANGLE) {
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
/* check for 1 edge having 2 face users */
- BMLoop *l1, *l2;
- if ((l1 = e->l) &&
- (l2 = e->l->radial_next) != l1)
- {
- if (dot_v3v3(l1->f->no, l2->f->no) < threshold) {
+ BMLoop *l_a, *l_b;
+ if (BM_edge_loop_pair(e, &l_a, &l_b)) {
+ if (dot_v3v3(l_a->f->no, l_b->f->no) < threshold) {
BM_elem_flag_enable(e, BM_ELEM_TAG);
BM_elem_flag_enable(e->v1, BM_ELEM_TAG);
BM_elem_flag_enable(e->v2, BM_ELEM_TAG);