diff options
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean_util.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_build.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_cloth.c | 10 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mask.c | 12 |
4 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c index 98f27d7b1b9..11d47bfffb1 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.c +++ b/source/blender/modifiers/intern/MOD_boolean_util.c @@ -366,7 +366,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh( // a hash table to remap materials to indices if (mat) { - material_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); + material_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "CSG_mat gh"); *totmat = 0; } diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index c946665e215..05ef85b818a 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -82,10 +82,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, GHashIterator *hashIter; /* maps vert indices in old mesh to indices in new mesh */ GHash *vertHash = BLI_ghash_new(BLI_ghashutil_inthash, - BLI_ghashutil_intcmp); + BLI_ghashutil_intcmp, "build ve apply gh"); /* maps edge indices in new mesh to indices in old mesh */ GHash *edgeHash = BLI_ghash_new(BLI_ghashutil_inthash, - BLI_ghashutil_intcmp); + BLI_ghashutil_intcmp, "build ed apply gh"); maxVerts = dm->getNumVerts(dm); vertMap = MEM_callocN(sizeof(*vertMap) * maxVerts, diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 865157ce585..5050333cd43 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -123,15 +123,19 @@ static void copyData(ModifierData *md, ModifierData *target) { ClothModifierData *clmd = (ClothModifierData*) md; ClothModifierData *tclmd = (ClothModifierData*) target; - - if(tclmd->sim_parms) + + if(tclmd->sim_parms) { + if(tclmd->sim_parms->effector_weights) + MEM_freeN(tclmd->sim_parms->effector_weights); MEM_freeN(tclmd->sim_parms); + } + if(tclmd->coll_parms) MEM_freeN(tclmd->coll_parms); BKE_ptcache_free_list(&tclmd->ptcaches); tclmd->point_cache = NULL; - + tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms); if(clmd->sim_parms->effector_weights) tclmd->sim_parms->effector_weights = MEM_dupallocN(clmd->sim_parms->effector_weights); diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index 25781f3dff0..e7f0495a817 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -129,8 +129,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, * - vgroups to indicies -> vgroupHash (string, int) * - bones to vgroup indices -> boneHash (index of vgroup, dummy) */ - vgroupHash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp); - boneHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp); + vgroupHash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "mask vgroup gh"); + boneHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask bone gh"); /* build mapping of names of vertex groups to indices */ for (i = 0, def = ob->defbase.first; def; def = def->next, i++) @@ -175,7 +175,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } /* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */ - vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp); + vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert gh"); /* add vertices which exist in vertexgroups into vertHash for filtering */ for (i = 0; i < maxVerts; i++) @@ -224,7 +224,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, return dm; /* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */ - vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp); + vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert2 bh"); /* add vertices which exist in vertexgroup into ghash for filtering */ for (i = 0; i < maxVerts; i++) @@ -258,8 +258,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } /* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */ - edgeHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp); - faceHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp); + edgeHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask ed2 gh"); + faceHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask fa2 gh"); /* loop over edges and faces, and do the same thing to * ensure that they only reference existing verts |