Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-29 07:25:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-29 07:25:37 +0400
commitc86045d7a29c2ffe3f102955560fda214d9f7f2d (patch)
tree23bd8ffa639a1996a2c0a0c817c6097c3c9b25c2 /source/blender/python/bmesh/bmesh_py_types_customdata.c
parent078487e98e9e06bd971b132fb7e856ba174b02c6 (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_types_customdata.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 14132d08fe6..fd31f3c40cc 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -262,16 +262,10 @@ static PyObject *bpy_bmlayeritem_copy_from(BPy_BMLayerItem *self, BPy_BMLayerIte
}
BPY_BM_CHECK_OBJ(self);
- BPY_BM_CHECK_OBJ(value);
-
- if (self->bm != value->bm) {
- PyErr_SetString(PyExc_ValueError,
- "layer.copy_from(): layer is from another mesh");
- return NULL;
- }
+ BPY_BM_CHECK_SOURCE_OBJ(value, self->bm, "layer.copy_from()");
- else if ((self->htype != value->htype) ||
- (self->type != value->type))
+ if ((self->htype != value->htype) ||
+ (self->type != value->type))
{
PyErr_SetString(PyExc_ValueError,
"layer.copy_from(other): layer type mismatch");