diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-28 03:32:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-28 03:32:11 +0400 |
commit | 75383a79f6364391f476976caa3fd0e1e84d6d99 (patch) | |
tree | 843c48a856ba8833ff116842736d84a5f6380d2e /source/blender/modifiers | |
parent | 377475f979f730278e23eea138fbcc530df63a91 (diff) |
array modifier was adding vertices to the 'targetmap' multiple times.
this is supported by weldop but would prefer not to allow multiple keys in the map.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 3478ec6e3b4..7280503bafb 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -319,8 +319,10 @@ static void merge_first_last(BMesh *bm, /* add new merge targets to weld operator */ slot_targetmap = BMO_slot_get(weld_op->slots_in, "targetmap"); BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) { - v2 = BMO_iter_map_value_p(&oiter); - BMO_slot_map_elem_insert(weld_op, slot_targetmap, v, v2); + if (!BMO_slot_map_contains(slot_targetmap, v)) { + v2 = BMO_iter_map_value_p(&oiter); + BMO_slot_map_elem_insert(weld_op, slot_targetmap, v, v2); + } } BMO_op_finish(bm, &find_op); @@ -344,7 +346,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, int *indexMap = NULL; DerivedMesh *start_cap = NULL, *end_cap = NULL; MVert *src_mvert; - BMOpSlot *slot_targetmap = NULL; /* for weldop */ + BMOpSlot *slot_targetmap = NULL; /* for weld_op */ /* need to avoid infinite recursion here */ if (amd->start_cap && amd->start_cap != ob && amd->start_cap->type == OB_MESH) |