diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-12 08:21:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-12 10:38:14 +0300 |
commit | 690b90f1e2cb949a3cdfb02678be844c4808f2cb (patch) | |
tree | 770053fda356cc5792a488ea863bbf7bb6e0c634 /source/blender/python/bmesh/bmesh_py_utils.c | |
parent | 6d2c3a245622fa836ae603666789970a2f83b1c1 (diff) |
BMesh: minor optimization counting adjacent data
add BM_***_count_is_over(), _count_is_equal()
Useful if we only want to know if the count is a smaller value.
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_utils.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c index 2e32a571e3c..0dd6ee7d51a 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.c +++ b/source/blender/python/bmesh/bmesh_py_utils.c @@ -84,7 +84,7 @@ static PyObject *bpy_bm_utils_vert_collapse_edge(PyObject *UNUSED(self), PyObjec return NULL; } - if (BM_vert_edge_count(py_vert->v) > 2) { + if (BM_vert_edge_count_is_over(py_vert->v, 2)) { PyErr_SetString(PyExc_ValueError, "vert_collapse_edge(vert, edge): vert has more than 2 connected edges"); return NULL; @@ -150,7 +150,7 @@ static PyObject *bpy_bm_utils_vert_collapse_faces(PyObject *UNUSED(self), PyObje return NULL; } - if (BM_vert_edge_count(py_vert->v) > 2) { + if (BM_vert_edge_count_is_over(py_vert->v, 2)) { PyErr_SetString(PyExc_ValueError, "vert_collapse_faces(vert, edge): vert has more than 2 connected edges"); return NULL; |