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:
authorJoseph Eagar <joeedh@gmail.com>2009-09-10 05:46:52 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-09-10 05:46:52 +0400
commitb0a1904d33a1c097a8e8fd56fe9b3c1d3a34ca55 (patch)
tree7a89f984f91cc4c20b365219f9de5663122a01ae /source/blender/blenkernel/intern/modifiers_bmesh.c
parentae446d79e027cf4eb6ea7290ea24c536711249d8 (diff)
another optimization pass. biggest change is MDeformGroup->dw is now allocated via a somewhat simplistic, if effective allocator. This needs a little bit more work; I'd really prefer building this into guardedalloc, but the method requires mempools, which currently live in blenlib. and I'm not sure if we can have guardedalloc linking with blenlib? anyway, current allocator code is more of a temporary fix until I figure that out.
Diffstat (limited to 'source/blender/blenkernel/intern/modifiers_bmesh.c')
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 36b661e3b1c..d281fb9bd2a 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -45,6 +45,7 @@
#include "BLI_edgehash.h"
#include "BLI_ghash.h"
#include "BLI_memarena.h"
+#include "BLI_cellalloc.h"
#include "MEM_guardedalloc.h"
@@ -288,7 +289,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
int numVerts, numEdges, numFaces;
int maxVerts, maxEdges, maxFaces;
int finalVerts, finalEdges, finalFaces;
- int *indexMap;
+ int *indexMap = NULL;
DerivedMesh *result, *start_cap = NULL, *end_cap = NULL;
MVert *src_mvert;
@@ -406,7 +407,6 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
#define _E(s, i) ((BMVert**)(s)->data.buf)[i]
-#if 0
/*calculate merge mapping*/
if (j == 0) {
BMOperator findop;
@@ -444,20 +444,19 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
BMO_Finish_Op(em->bm, &findop);
}
-#endif
/*generate merge mappping using index map. we do this by using the
operator slots as lookup arrays.*/
#define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len)
- /*for (i=0; i<indexLen; i++) {
+ for (i=0; i<indexLen; i++) {
if (!indexMap[i]) continue;
v = E(i);
v2 = E(indexMap[i]-1);
BMO_Insert_MapPointer(em->bm, &weldop, "targetmap", v, v2);
- }*/
+ }
#undef E
#undef _E
@@ -477,7 +476,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
cddm = CDDM_from_BMEditMesh(em, NULL);
BMEdit_Free(em);
- //MEM_freeN(indexMap);
+ MEM_freeN(indexMap);
return cddm;
}