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-25 12:48:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-25 12:48:05 +0400
commit53d4685c953430f19fe5c75102b9e2868dd738a0 (patch)
treed39e39ddb1452d8f9c37016754e6617b30cff566
parent95ddd19d1385cd2ab2962a62013ae7493de960e7 (diff)
skip updating tessface customdata layers when joining meshes & clear tessface data on the target mesh so stale tessface data isnt used.
-rw-r--r--source/blender/editors/mesh/meshtools.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index c2580b4da55..9feaafbd857 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -165,6 +165,9 @@ int join_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ /* remove tessface to ensure we don't old references to invalid faces */
+ BKE_mesh_tessface_clear(me);
+
/* new material indices and material array */
matar = MEM_callocN(sizeof(void *) * totmat, "join_mesh matar");
if (totmat) matmap = MEM_callocN(sizeof(int) * totmat, "join_mesh matmap");
@@ -513,7 +516,8 @@ int join_mesh_exec(bContext *C, wmOperator *op)
me->ldata = ldata;
me->pdata = pdata;
- mesh_update_customdata_pointers(me, TRUE); /* BMESH_TODO, check if this arg can be failse, non urgent - campbell */
+ /* tessface data removed above, no need to update */
+ mesh_update_customdata_pointers(me, FALSE);
/* old material array */
for (a = 1; a <= ob->totcol; a++) {