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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-08 20:26:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-08 20:26:36 +0300
commit305c455ffe36161baeb9495942808ddb7ac486bb (patch)
tree86201d85dc166cacee1eb137f73c9a30829ad971 /source/blender/blenkernel/intern/mesh_runtime.c
parent65ae4e27b03ca0f386bf312980046193f105e5f3 (diff)
Cleanup: mesh_runtime naming
- BKE_mesh_get_looptri_num -> BKE_mesh_runtime_looptri_len - BKE_mesh_runtime_recalc_looptri -> BKE_mesh_runtime_looptri_recalc - BKE_mesh_get_looptri_array -> BKE_mesh_runtime_looptri_ensure
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_runtime.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_runtime.c16
1 files changed, 8 insertions, 8 deletions
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);