diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-16 23:58:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-16 23:59:14 +0400 |
commit | 9cc5c157e8d20c7652953f864b8e24e9bc810748 (patch) | |
tree | f34399c203be6a369063619ca904b65bdfee18a3 /source/blender/modifiers/intern/MOD_solidify.c | |
parent | 1b4ced86b911b177ff23fb9aa3d7a76b3714aae8 (diff) |
Minor change to last commit to solidify, only allocate bitmap as needed
Diffstat (limited to 'source/blender/modifiers/intern/MOD_solidify.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 30c52c1c8ae..32abf8dcb19 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"); } |