[Bf-blender-cvs] [aea637456e7] master: BKE: BVHtree: Replace all external references of `bvhtree_from_mesh_looptri` with `bvhtree_from_mesh_get`.

Germano noreply at git.blender.org
Fri May 4 14:21:50 CEST 2018


Commit: aea637456e7db640f9a1a83416769245a9b18a7d
Author: Germano
Date:   Fri May 4 09:21:42 2018 -0300
Branches: master
https://developer.blender.org/rBaea637456e7db640f9a1a83416769245a9b18a7d

BKE: BVHtree: Replace all external references of `bvhtree_from_mesh_looptri` with `bvhtree_from_mesh_get`.

===================================================================

M	source/blender/blenkernel/BKE_bvhutils.h
M	source/blender/blenkernel/intern/bvhutils.c
M	source/blender/blenkernel/intern/mesh_remap.c
M	source/blender/makesrna/intern/rna_object_api.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index b9f07e07f12..57a6c413ce0 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -148,8 +148,6 @@ BVHTree *bvhtree_from_editmesh_looptri_ex(
         const BLI_bitmap *mask, int looptri_num_active,
         float epsilon, int tree_type, int axis, BVHCache **bvhCache);
 
-BVHTree *bvhtree_from_mesh_looptri(
-        struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
 BVHTree *bvhtree_from_mesh_looptri_ex(
         struct BVHTreeFromMesh *data,
         const struct MVert *vert, const bool vert_allocated,
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 416ac3cbaa0..440db911298 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1127,7 +1127,7 @@ BVHTree *bvhtree_from_editmesh_looptri(
  *
  * \note for editmesh this is currently a duplicate of bvhtree_from_mesh_faces
  */
-BVHTree *bvhtree_from_mesh_looptri(
+static BVHTree *bvhtree_from_mesh_looptri(
         BVHTreeFromMesh *data, DerivedMesh *dm,
         float epsilon, int tree_type, int axis)
 {
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index cf4c70c4aaa..1b05745550d 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -1409,7 +1409,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
 			}
 			else {
 				BLI_assert(num_trees == 1);
-				bvhtree_from_mesh_looptri(&treedata[0], dm_src, 0.0, 2, 6);
+				bvhtree_from_mesh_get(&treedata[0], dm_src, BVHTREE_FROM_LOOPTRI, 2);
 			}
 		}
 
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index be63fc4abc8..9b8a98a8831 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -336,7 +336,7 @@ static void rna_Object_ray_cast(
 		BVHTreeFromMesh treeData = {NULL};
 
 		/* no need to managing allocation or freeing of the BVH data. this is generated and freed as needed */
-		bvhtree_from_mesh_looptri(&treeData, ob->derivedFinal, 0.0f, 4, 6);
+		bvhtree_from_mesh_get(&treeData, ob->derivedFinal, BVHTREE_FROM_LOOPTRI, 4);
 
 		/* may fail if the mesh has no faces, in that case the ray-cast misses */
 		if (treeData.tree != NULL) {
@@ -385,7 +385,7 @@ static void rna_Object_closest_point_on_mesh(
 	}
 
 	/* no need to managing allocation or freeing of the BVH data. this is generated and freed as needed */
-	bvhtree_from_mesh_looptri(&treeData, ob->derivedFinal, 0.0f, 4, 6);
+	bvhtree_from_mesh_get(&treeData, ob->derivedFinal, BVHTREE_FROM_LOOPTRI, 4);
 
 	if (treeData.tree == NULL) {
 		BKE_reportf(reports, RPT_ERROR, "Object '%s' could not create internal data for finding nearest point",



More information about the Bf-blender-cvs mailing list