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:
authorAndrew Hale <TrumanBlending@gmail.com>2012-05-22 16:03:56 +0400
committerAndrew Hale <TrumanBlending@gmail.com>2012-05-22 16:03:56 +0400
commitc63602286c82682f62a96908f065d9552b0947b7 (patch)
tree60e212833ad65192d5a47ba39b1f2b56a0f9a4f7 /source/blender/bmesh
parent8b2ffc1428bd8bd27568fa7e340841149addaaf5 (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/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index f64b55193c5..c39096d0800 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -852,24 +852,24 @@ void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int ds
BMVert *eve;
BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) {
- void *ptr = CustomData_bmesh_get_n(data, eve->head.data, type, dst_n);
- CustomData_bmesh_set_n(data, eve->head.data, type, src_n, ptr);
+ void *ptr = CustomData_bmesh_get_n(data, eve->head.data, type, src_n);
+ CustomData_bmesh_set_n(data, eve->head.data, type, dst_n, ptr);
}
}
else if (&bm->edata == data) {
BMEdge *eed;
BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) {
- void *ptr = CustomData_bmesh_get_n(data, eed->head.data, type, dst_n);
- CustomData_bmesh_set_n(data, eed->head.data, type, src_n, ptr);
+ void *ptr = CustomData_bmesh_get_n(data, eed->head.data, type, src_n);
+ CustomData_bmesh_set_n(data, eed->head.data, type, dst_n, ptr);
}
}
else if (&bm->pdata == data) {
BMFace *efa;
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
- void *ptr = CustomData_bmesh_get_n(data, efa->head.data, type, dst_n);
- CustomData_bmesh_set_n(data, efa->head.data, type, src_n, ptr);
+ void *ptr = CustomData_bmesh_get_n(data, efa->head.data, type, src_n);
+ CustomData_bmesh_set_n(data, efa->head.data, type, dst_n, ptr);
}
}
else if (&bm->ldata == data) {
@@ -879,8 +879,8 @@ void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int ds
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- void *ptr = CustomData_bmesh_get_n(data, l->head.data, type, dst_n);
- CustomData_bmesh_set_n(data, l->head.data, type, src_n, ptr);
+ void *ptr = CustomData_bmesh_get_n(data, l->head.data, type, src_n);
+ CustomData_bmesh_set_n(data, l->head.data, type, dst_n, ptr);
}
}
}