Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / multires.c
index f44f1265904532743569018c49f2bf0140511346..22a335c7fd4d0df1c7fcb7d8fa7b0b9825018851 100644 (file)
@@ -539,7 +539,7 @@ static void multires_copy_dm_grid(CCGElem *gridA, CCGElem *gridB, CCGKey *keyA,
                        for (x = 0; x < keyB->grid_size; x++, j++)
                                memcpy(CCG_elem_offset_co(keyA, gridA, y * skip * keyA->grid_size + x * skip),
                                       CCG_elem_offset_co(keyB, gridB, j),
-                                      sizeof(float) * keyA->num_layers);
+                                      keyA->elem_size);
        }
        else {
                skip = (keyB->grid_size - 1) / (keyA->grid_size - 1);
@@ -548,7 +548,7 @@ static void multires_copy_dm_grid(CCGElem *gridA, CCGElem *gridB, CCGKey *keyA,
                        for (x = 0; x < keyA->grid_size; x++, j++)
                                memcpy(CCG_elem_offset_co(keyA, gridA, j),
                                       CCG_elem_offset_co(keyB, gridB, y * skip * keyB->grid_size + x * skip),
-                                      sizeof(float) * keyA->num_layers);
+                                      keyA->elem_size);
        }
 }