diff options
author | Germano <germano.costa@ig.com.br> | 2018-05-04 13:39:07 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-05-04 13:39:07 +0300 |
commit | 3d26cf112b2d1b71f908123cf72caa495e8e3f74 (patch) | |
tree | c390ed0b4c93c1ba266be0bd0ab05a7831cf530c /source/blender/blenkernel/intern/constraint.c | |
parent | 82d59c6588d78d3975831a51d4de491895c714a3 (diff) |
Constraint: Shrink Warp: Replace `bvhtree_from_mesh_looptri` with` bvhtree_from_mesh_get`.
The value of epsilon was never used to create this bvhtree because whenever we activate this constraint, a bvhtree with parameter epsilon 0.0 was created and cached.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 4689de825b2..88b2ca20563 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3562,15 +3562,15 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra break; } - bvhtree_from_mesh_looptri(&treeData, target, scon->dist, 4, 6); + bvhtree_from_mesh_get(&treeData, target, BVHTREE_FROM_LOOPTRI, 4); if (treeData.tree == NULL) { fail = true; break; } - - if (BKE_shrinkwrap_project_normal(0, co, no, &transform, treeData.tree, &hit, - treeData.raycast_callback, &treeData) == false) + treeData.sphere_radius = scon->dist; + if (BKE_shrinkwrap_project_normal(0, co, no, treeData.sphere_radius, &transform, treeData.tree, + &hit, treeData.raycast_callback, &treeData) == false) { fail = true; break; |