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.
This commit is contained in:
2012-11-29 03:25:37 +00:00
parent 078487e98e
commit c86045d7a2
5 changed files with 46 additions and 92 deletions

View File

@@ -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);