diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-15 05:47:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-15 05:47:40 +0400 |
commit | 9f741348621a371201e9ab7a1d5c63ff1b1b9a27 (patch) | |
tree | db78d1147e7af83efd95ac90895aaf8230d0ba79 /source/blender | |
parent | 506db730329a1e78c78391cc973a35265df6b169 (diff) |
replace BLI_edgehash_insert with BLI_edgehash_reinsert for explode operator, was inserting the same edges more then once.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/modifiers/intern/MOD_explode.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index f6b882c5a69..9fd11f78ea0 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -586,12 +586,12 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm) v3 = vertpa[mf->v3]; if (v1 != v2) { - BLI_edgehash_insert(edgehash, mf->v1, mf->v2, NULL); + BLI_edgehash_reinsert(edgehash, mf->v1, mf->v2, NULL); (*fs) |= 1; } if (v2 != v3) { - BLI_edgehash_insert(edgehash, mf->v2, mf->v3, NULL); + BLI_edgehash_reinsert(edgehash, mf->v2, mf->v3, NULL); (*fs) |= 2; } @@ -599,24 +599,24 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm) v4 = vertpa[mf->v4]; if (v3 != v4) { - BLI_edgehash_insert(edgehash, mf->v3, mf->v4, NULL); + BLI_edgehash_reinsert(edgehash, mf->v3, mf->v4, NULL); (*fs) |= 4; } if (v1 != v4) { - BLI_edgehash_insert(edgehash, mf->v1, mf->v4, NULL); + BLI_edgehash_reinsert(edgehash, mf->v1, mf->v4, NULL); (*fs) |= 8; } /* mark center vertex as a fake edge split */ if (*fs == 15) - BLI_edgehash_insert(edgehash, mf->v1, mf->v3, NULL); + BLI_edgehash_reinsert(edgehash, mf->v1, mf->v3, NULL); } else { (*fs) |= 16; /* mark face as tri */ if (v1 != v3) { - BLI_edgehash_insert(edgehash, mf->v1, mf->v3, NULL); + BLI_edgehash_reinsert(edgehash, mf->v1, mf->v3, NULL); (*fs) |= 4; } } @@ -846,11 +846,11 @@ static DerivedMesh *explodeMesh(ExplodeModifierData *emd, mf = &mface[i]; /* set face vertices to exist in particle group */ - BLI_edgehash_insert(vertpahash, mf->v1, mindex, NULL); - BLI_edgehash_insert(vertpahash, mf->v2, mindex, NULL); - BLI_edgehash_insert(vertpahash, mf->v3, mindex, NULL); + BLI_edgehash_reinsert(vertpahash, mf->v1, mindex, NULL); + BLI_edgehash_reinsert(vertpahash, mf->v2, mindex, NULL); + BLI_edgehash_reinsert(vertpahash, mf->v3, mindex, NULL); if (mf->v4) - BLI_edgehash_insert(vertpahash, mf->v4, mindex, NULL); + BLI_edgehash_reinsert(vertpahash, mf->v4, mindex, NULL); } /* make new vertice indexes & count total vertices after duplication */ |