diff options
author | Andrew Hale <TrumanBlending@gmail.com> | 2012-05-22 16:03:56 +0400 |
---|---|---|
committer | Andrew Hale <TrumanBlending@gmail.com> | 2012-05-22 16:03:56 +0400 |
commit | c63602286c82682f62a96908f065d9552b0947b7 (patch) | |
tree | 60e212833ad65192d5a47ba39b1f2b56a0f9a4f7 /source/blender/python | |
parent | 8b2ffc1428bd8bd27568fa7e340841149addaaf5 (diff) |
Fix for customdata layer copying. Issue was caused by mixing up of destination and source in copy function. Also fixed an error in Py API, check to see if layers were different should be check to see if they're the same.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_customdata.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index f25222c89da..d484ad5c87e 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -271,13 +271,16 @@ static PyObject *bpy_bmlayeritem_copy_from(BPy_BMLayerItem *self, BPy_BMLayerIte } else if ((self->htype != value->htype) || - (self->type != value->type) || - (self->index != value->index)) + (self->type != value->type)) { PyErr_SetString(PyExc_ValueError, "layer.copy_from(other): layer type mismatch"); } + else if (self->index == value->index) { + Py_RETURN_NONE; + } + data = bpy_bm_customdata_get(self->bm, self->htype); if ((bpy_bmlayeritem_get(self) == NULL) || |