diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-29 07:25:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-29 07:25:37 +0400 |
commit | c86045d7a29c2ffe3f102955560fda214d9f7f2d (patch) | |
tree | 23bd8ffa639a1996a2c0a0c817c6097c3c9b25c2 /source/blender/python/bmesh/bmesh_py_utils.c | |
parent | 078487e98e9e06bd971b132fb7e856ba174b02c6 (diff) |
bmesh py api: use generic checking macros to see if an object if from the same bmesh.
- was such a common operation so this saves having exceptions set inline all over the place.
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_utils.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_utils.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c index b70df53aff0..f85c3347104 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.c +++ b/source/blender/python/bmesh/bmesh_py_utils.c @@ -557,16 +557,10 @@ static PyObject *bpy_bm_utils_face_vert_separate(PyObject *UNUSED(self), PyObjec return NULL; } - BPY_BM_CHECK_OBJ(py_face); - BPY_BM_CHECK_OBJ(py_vert); - bm = py_face->bm; - if (bm != py_vert->bm) { - PyErr_SetString(PyExc_ValueError, - "mesh elements are from different meshes"); - return NULL; - } + BPY_BM_CHECK_OBJ(py_face); + BPY_BM_CHECK_SOURCE_OBJ(py_vert, bm, "face_vert_separate()"); l = BM_face_vert_share_loop(py_face->f, py_vert->v); |