[Bf-blender-cvs] [9cc5c15] master: Minor change to last commit to solidify, only allocate bitmap as needed
Campbell Barton
noreply at git.blender.org
Thu Jan 16 20:59:32 CET 2014
Commit: 9cc5c157e8d20c7652953f864b8e24e9bc810748
Author: Campbell Barton
Date: Fri Jan 17 06:58:09 2014 +1100
https://developer.blender.org/rB9cc5c157e8d20c7652953f864b8e24e9bc810748
Minor change to last commit to solidify, only allocate bitmap as needed
===================================================================
M source/blender/modifiers/intern/MOD_solidify.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 30c52c1..32abf8d 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -257,8 +257,6 @@ static DerivedMesh *applyModifier(
const int defgrp_invert = ((smd->flag & MOD_SOLIDIFY_VGROUP_INV) != 0);
int defgrp_index;
- BLI_bitmap *orig_mvert_tag = BLI_BITMAP_NEW(numVerts, "solidify origvert tag bitmap");
-
modifier_get_vgroup(ob, dm, smd->defgrp_name, &dvert, &defgrp_index);
orig_mvert = dm->getVertArray(dm);
@@ -280,6 +278,7 @@ static DerivedMesh *applyModifier(
STACK_INIT(new_edge_arr);
if (smd->flag & MOD_SOLIDIFY_RIM) {
+ BLI_bitmap *orig_mvert_tag = BLI_BITMAP_NEW(numVerts, __func__);
unsigned int eidx;
#define INVALID_UNUSED ((unsigned int)-1)
@@ -291,6 +290,7 @@ static DerivedMesh *applyModifier(
edge_users = MEM_mallocN(sizeof(*edge_users) * (size_t)numEdges, "solid_mod edges");
edge_order = MEM_mallocN(sizeof(*edge_order) * (size_t)numEdges, "solid_mod eorder");
+
/* save doing 2 loops here... */
#if 0
fill_vn_i(edge_users, numEdges, INVALID_UNUSED);
@@ -344,6 +344,8 @@ static DerivedMesh *applyModifier(
newEdges++;
}
}
+
+ MEM_freeN(orig_mvert_tag);
}
if (smd->flag & MOD_SOLIDIFY_NORMAL_CALC) {
@@ -821,8 +823,6 @@ static DerivedMesh *applyModifier(
if (face_nors)
MEM_freeN(face_nors);
- MEM_freeN(orig_mvert_tag);
-
if (numFaces == 0 && numEdges != 0) {
modifier_setError(md, "Faces needed for useful output");
}
More information about the Bf-blender-cvs
mailing list