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:
@@ -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) ||
|
||||
|
Reference in New Issue
Block a user