From 0b7f5813973c515b84cd7c18ef6d7d1e59374237 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 13 Apr 2014 12:25:02 +0200 Subject: Split Normals I (2/5): Add basic BMesh support of split normals. * Merely a re-implementation of core split algorithm for BMesh, taking advantage of topological data available. * This code needs valid loop indices, so added BM_LOOP support to BM_mesh_elem_index_ensure() & co. Reviewers: campbellbarton Reviewed By: campbellbarton CC: brecht Differential Revision: https://developer.blender.org/D366 --- source/blender/python/bmesh/bmesh_py_types.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source/blender/python/bmesh/bmesh_py_types.c') diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 6302561cb7e..c2b496f914b 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -176,9 +176,7 @@ static int bpy_bm_elem_index_set(BPy_BMElem *self, PyObject *value, void *UNUSED BM_elem_index_set(self->ele, param); /* set_dirty! */ /* when setting the index assume its set invalid */ - if (self->ele->head.htype & (BM_VERT | BM_EDGE | BM_FACE)) { - self->bm->elem_index_dirty |= self->ele->head.htype; - } + self->bm->elem_index_dirty |= self->ele->head.htype; return 0; } @@ -2264,11 +2262,9 @@ static PyObject *bpy_bmelemseq_index_update(BPy_BMElemSeq *self) index++; } - if (htype & (BM_VERT | BM_EDGE | BM_FACE)) { - /* since this isn't the normal vert/edge/face loops, - * we're setting dirty values here. so tag as dirty. */ - bm->elem_index_dirty |= htype; - } + /* since this isn't the normal vert/edge/face loops, + * we're setting dirty values here. so tag as dirty. */ + bm->elem_index_dirty |= htype; break; } -- cgit v1.2.3