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:
-rw-r--r--source/blender/blenkernel/BKE_mesh.h6
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c4
-rw-r--r--source/blender/blenkernel/intern/mesh_runtime.c16
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
5 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index ecfc986215b..a170a2a32eb 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -193,9 +193,9 @@ void BKE_mesh_apply_vert_coords(struct Mesh *mesh, float (*vertCoords)[3]);
/* *** mesh_runtime.c *** */
-void BKE_mesh_runtime_recalc_looptri(struct Mesh *mesh);
-int BKE_mesh_get_looptri_num(struct Mesh *mesh);
-const struct MLoopTri *BKE_mesh_get_looptri_array(struct Mesh *mesh);
+int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh);
+void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh);
+const struct MLoopTri *BKE_mesh_runtime_looptri_ensure(struct Mesh *mesh);
/* *** mesh_evaluate.c *** */
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 00aa89b3776..5c2d81f5841 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1184,14 +1184,14 @@ BVHTree *BKE_bvhtree_from_mesh_looptri(
mvert = mesh->mvert;
mloop = mesh->mloop;
- looptri = BKE_mesh_get_looptri_array(mesh);
+ looptri = BKE_mesh_runtime_looptri_ensure(mesh);
/* Not in cache */
if (tree == NULL) {
BLI_rw_mutex_lock(&cache_rwlock, THREAD_LOCK_WRITE);
tree = bvhcache_find(mesh->runtime.bvh_cache, BVHTREE_FROM_LOOPTRI);
if (tree == NULL) {
- int looptri_num = BKE_mesh_get_looptri_num(mesh);
+ int looptri_num = BKE_mesh_runtime_looptri_len(mesh);
/* this assert checks we have looptris,
* if not caller should use DM_ensure_looptri() */
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c
index 02caf454b7e..96fc472ac8f 100644
--- a/source/blender/blenkernel/intern/mesh_runtime.c
+++ b/source/blender/blenkernel/intern/mesh_runtime.c
@@ -80,7 +80,7 @@ static void mesh_ensure_looptri_data(Mesh *mesh)
}
/* This is a ported copy of CDDM_recalc_looptri(dm). */
-void BKE_mesh_runtime_recalc_looptri(Mesh *mesh)
+void BKE_mesh_runtime_looptri_recalc(Mesh *mesh)
{
mesh_ensure_looptri_data(mesh);
BLI_assert(mesh->totpoly == 0 || mesh->runtime.looptris.array_wip != NULL);
@@ -97,15 +97,15 @@ void BKE_mesh_runtime_recalc_looptri(Mesh *mesh)
}
/* This is a ported copy of dm_getNumLoopTri(dm). */
-int BKE_mesh_get_looptri_num(Mesh *mesh)
+int BKE_mesh_runtime_looptri_len(const Mesh *mesh)
{
- const int numlooptris = poly_to_tri_count(mesh->totpoly, mesh->totloop);
- BLI_assert(ELEM(mesh->runtime.looptris.num, 0, numlooptris));
- return numlooptris;
+ const int looptri_len = poly_to_tri_count(mesh->totpoly, mesh->totloop);
+ BLI_assert(ELEM(mesh->runtime.looptris.num, 0, looptri_len));
+ return looptri_len;
}
/* This is a ported copy of dm_getLoopTriArray(dm). */
-const MLoopTri *BKE_mesh_get_looptri_array(Mesh *mesh)
+const MLoopTri *BKE_mesh_runtime_looptri_ensure(Mesh *mesh)
{
MLoopTri *looptri;
@@ -114,14 +114,14 @@ const MLoopTri *BKE_mesh_get_looptri_array(Mesh *mesh)
BLI_rw_mutex_unlock(&loops_cache_lock);
if (looptri != NULL) {
- BLI_assert(BKE_mesh_get_looptri_num(mesh) == mesh->runtime.looptris.num);
+ BLI_assert(BKE_mesh_runtime_looptri_len(mesh) == mesh->runtime.looptris.num);
}
else {
BLI_rw_mutex_lock(&loops_cache_lock, THREAD_LOCK_WRITE);
/* We need to ensure array is still NULL inside mutex-protected code, some other thread might have already
* recomputed those looptris. */
if (mesh->runtime.looptris.array == NULL) {
- BKE_mesh_runtime_recalc_looptri(mesh);
+ BKE_mesh_runtime_looptri_recalc(mesh);
}
looptri = mesh->runtime.looptris.array;
BLI_rw_mutex_unlock(&loops_cache_lock);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 5503a4880df..31f31460dfe 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1463,7 +1463,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
Mesh *me = mdb->cagemesh;
mdb->cagemesh_cache.mpoly = me->mpoly;
mdb->cagemesh_cache.mloop = me->mloop;
- mdb->cagemesh_cache.looptri = BKE_mesh_get_looptri_array(me);
+ mdb->cagemesh_cache.looptri = BKE_mesh_runtime_looptri_ensure(me);
mdb->cagemesh_cache.poly_nors = CustomData_get_layer(&me->pdata, CD_NORMAL); /* can be NULL */
}
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index af81ac8423b..d90d5227e17 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -69,7 +69,7 @@ typedef struct EditMeshData {
/**
- * \warning Typical access is done via #BKE_mesh_get_looptri_array, #BKE_mesh_get_looptri_num.
+ * \warning Typical access is done via #BKE_mesh_runtime_looptri_ensure, #BKE_mesh_runtime_looptri_len.
*/
struct LooptrisData {
/* WARNING! swapping between array (ready-to-be-used data) and array_wip (where data is actually computed)