[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59580] trunk/blender/source/blender: array modifier was adding vertices to the 'targetmap' multiple times.
Campbell Barton
ideasman42 at gmail.com
Wed Aug 28 01:32:11 CEST 2013
Revision: 59580
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59580
Author: campbellbarton
Date: 2013-08-27 23:32:11 +0000 (Tue, 27 Aug 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/bmesh/operators/bmo_removedoubles.c
trunk/blender/source/blender/modifiers/intern/MOD_array.c
Modified: trunk/blender/source/blender/bmesh/operators/bmo_removedoubles.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_removedoubles.c 2013-08-27 23:31:43 UTC (rev 59579)
+++ trunk/blender/source/blender/bmesh/operators/bmo_removedoubles.c 2013-08-27 23:32:11 UTC (rev 59580)
@@ -71,6 +71,11 @@
#define EDGE_COL 2
#define FACE_MARK 2
+/**
+ * \note with 'targetmap', multiple 'keys' are currently supported, though no callers should be using.
+ * (because slot maps currently use GHash without the GHASH_FLAG_ALLOW_DUPES flag set)
+ *
+ */
void bmo_weld_verts_exec(BMesh *bm, BMOperator *op)
{
BMIter iter, liter;
Modified: trunk/blender/source/blender/modifiers/intern/MOD_array.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_array.c 2013-08-27 23:31:43 UTC (rev 59579)
+++ trunk/blender/source/blender/modifiers/intern/MOD_array.c 2013-08-27 23:32:11 UTC (rev 59580)
@@ -319,8 +319,10 @@
/* 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 @@
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)
More information about the Bf-blender-cvs
mailing list