diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-13 14:25:02 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-13 14:25:54 +0400 |
commit | 0b7f5813973c515b84cd7c18ef6d7d1e59374237 (patch) | |
tree | b3023962b59abf0e594a977f88661682d9e8e8b7 /source/blender/python | |
parent | 18e4224142261cd8a1086c5872efb406b82f8330 (diff) |
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
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 12 |
1 files changed, 4 insertions, 8 deletions
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; } |