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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-06 20:25:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-06 20:25:06 +0400
commit7b4536b3a9b82b24ebd0a5a7dc5f9721e07672ba (patch)
treeb1d336140fc2362e7b7a22c1ab620410cf5238a9 /source/blender
parent080c49d176923eb04f66f8e7f8e919f3b10a2fd4 (diff)
Fix #20911: automatic bone weights work poorly when vertex lies
exactly on a bone, tweak epsilons to make this work better.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/armature/meshlaplacian.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index c5e96dd5fd4..bc50befa2a9 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;