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:
Diffstat (limited to 'source/blender/editors/armature/meshlaplacian.c')
-rw-r--r--source/blender/editors/armature/meshlaplacian.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index c5e96dd5fd4..4f0805cd0d6 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -523,10 +523,8 @@ static void heat_set_H(LaplacianSystem *sys, int vertex)
/* compute H entry */
if(numclosest > 0) {
- if(mindist > 1e-5)
- h= numclosest*C_WEIGHT/(mindist*mindist);
- else
- h= 1e10f;
+ mindist= maxf(mindist, 1e-4f);
+ h= numclosest*C_WEIGHT/(mindist*mindist);
}
else
h= 0.0f;
@@ -1766,7 +1764,7 @@ static void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd,
else
mdb->weights= MEM_callocN(sizeof(float)*mdb->totvert*mdb->totcagevert, "MDefWeights");
- mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
BLI_memarena_use_calloc(mdb->memarena);
/* make bounding box equal size in all directions, add padding, and compute
@@ -1806,7 +1804,7 @@ static void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd,
/* free temporary MDefBoundIsects */
BLI_memarena_free(mdb->memarena);
- mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE);
+ mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
/* start with all cells untyped */
for(a=0; a<mdb->size3; a++)