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:
authorCampbell Barton <ideasman42@gmail.com>2012-10-31 13:50:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-31 13:50:24 +0400
commit12ed0c64bc7062f46cd1307b5566e99064330733 (patch)
tree82d27db755d250546cc5edf61addd701c8f4cdbd /source/blender/editors
parent26748efc037ccc069e1a08642d124bdfc50c6862 (diff)
make use customdata typeoffset more, add an assert to ensure its to date.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/mesh_data.c1
-rw-r--r--source/blender/editors/mesh/meshtools.c12
2 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index a4640677a4e..5414ba2aefb 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -947,6 +947,7 @@ static void mesh_add_verts(Mesh *mesh, int len)
/* scan the input list and insert the new vertices */
+ /* set default flags */
mvert = &mesh->mvert[mesh->totvert];
for (i = 0; i < len; i++, mvert++)
mvert->flag |= SELECT;
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 765f9307247..c0b6327d740 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -299,12 +299,12 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* setup new data for destination mesh */
- memset(&vdata, 0, sizeof(vdata));
- memset(&edata, 0, sizeof(edata));
- memset(&fdata, 0, sizeof(fdata));
- memset(&ldata, 0, sizeof(ldata));
- memset(&pdata, 0, sizeof(pdata));
-
+ CustomData_reset(&vdata);
+ CustomData_reset(&edata);
+ CustomData_reset(&fdata);
+ CustomData_reset(&ldata);
+ CustomData_reset(&pdata);
+
mvert = CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
medge = CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
mloop = CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop);