diff options
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_runtime.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_runtime.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c index 011dd7e25ee..6ae534012a9 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.c +++ b/source/blender/blenkernel/intern/mesh_runtime.c @@ -158,8 +158,12 @@ static void mesh_runtime_looptri_recalc_isolated(void *userdata) BKE_mesh_runtime_looptri_recalc(mesh); } -/* This is a ported copy of dm_getLoopTriArray(dm). */ -const MLoopTri *BKE_mesh_runtime_looptri_ensure(Mesh *mesh) +/** + * \note This function only fills a cache, and therefore the mesh argument can + * be considered logically const. Concurrent access is protected by a mutex. + * \note This is a ported copy of dm_getLoopTriArray(dm). + */ +const MLoopTri *BKE_mesh_runtime_looptri_ensure(const Mesh *mesh) { ThreadMutex *mesh_eval_mutex = (ThreadMutex *)mesh->runtime.eval_mutex; BLI_mutex_lock(mesh_eval_mutex); |