diff options
author | Germano <germano.costa@ig.com.br> | 2018-05-03 20:26:39 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-05-03 20:26:39 +0300 |
commit | ac19483e632bd3e2388a6a0de2db753efe33a860 (patch) | |
tree | a7b7433b51a8501875ab142658749b3ded6b224d /source/blender/editors/transform | |
parent | a5d0597b927d90c3621f8a40b0703cc158800fb8 (diff) |
BKE bvhtree: Add `tree_type` parameter to `bvhtree_from_mesh_get`.
This will allow greater control of the bvhtrees that are obtained, and helps identify problems.
It is also an additional step to unify the functions.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 569c662d31c..94c473d6a65 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -444,7 +444,7 @@ static bool raycastDerivedMesh( } if (treedata->tree == NULL) { - bvhtree_from_mesh_looptri(treedata, dm, 0.0f, 4, 6); + bvhtree_from_mesh_get(treedata, dm, BVHTREE_FROM_LOOPTRI, 4); if (treedata->tree == NULL) { return retval; @@ -1687,10 +1687,10 @@ static bool snapDerivedMesh( if (treedata->tree == NULL) { switch (snapdata->snap_to) { case SCE_SNAP_MODE_EDGE: - bvhtree_from_mesh_get(treedata, dm, BVHTREE_FROM_EDGES); + bvhtree_from_mesh_get(treedata, dm, BVHTREE_FROM_EDGES, 2); break; case SCE_SNAP_MODE_VERTEX: - bvhtree_from_mesh_get(treedata, dm, BVHTREE_FROM_VERTS); + bvhtree_from_mesh_get(treedata, dm, BVHTREE_FROM_VERTS, 2); break; } } |