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.

This commit is contained in:
2012-05-22 12:03:56 +00:00
parent 8b2ffc1428
commit c63602286c
3 changed files with 34 additions and 31 deletions

View File

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