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
path: root/source
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-01-24 15:32:28 +0300
committermano-wii <germano.costa@ig.com.br>2019-01-24 15:32:28 +0300
commitf172cea484c1f3b4083e7e1574bd33a2c6873f93 (patch)
tree8cc2260e0dca1cf0df0b0494a2180d2638246fde /source
parentd753726ce71260296abdccd953fcf95e53b6502f (diff)
Fix T59423: Mesh deform modifier bind bug causing spiky deformations.
Same as rBac316a6526c7. (I should have commited in 2.7 first and then merged in 2.8).
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/armature/meshlaplacian.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 4e31fcc7a11..b42ec77c052 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -898,9 +898,10 @@ static void harmonic_ray_callback(void *userdata, int index, const BVHTreeRay *r
face[1] = mdb->cagecos[mloop[lt->tri[1]].v];
face[2] = mdb->cagecos[mloop[lt->tri[2]].v];
- if (!isect_ray_tri_watertight_v3(
- ray->origin, ray->isect_precalc, UNPACK3(face), &dist, NULL))
- {
+ bool isect_ray_tri = isect_ray_tri_watertight_v3(
+ ray->origin, ray->isect_precalc, UNPACK3(face), &dist, NULL);
+
+ if (!isect_ray_tri || dist > isec->vec_length) {
return;
}