diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-24 12:41:08 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-24 12:41:08 +0300 |
commit | c25df02ac3036449081701349d36d2f16b2c92f2 (patch) | |
tree | 29603afd3baced747546f4a841cbd4ab73bc7052 /source/blender/blenkernel/intern/mesh_runtime.cc | |
parent | 8422da13c929f65850a723794a27baa924929377 (diff) |
Cleanup: simplify accessing mesh looptris
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_runtime.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_runtime.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_runtime.cc b/source/blender/blenkernel/intern/mesh_runtime.cc index 782657428f5..062d6cdb952 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.cc +++ b/source/blender/blenkernel/intern/mesh_runtime.cc @@ -112,6 +112,13 @@ void BKE_mesh_runtime_clear_cache(Mesh *mesh) BKE_mesh_clear_derived_normals(mesh); } +blender::Span<MLoopTri> Mesh::looptris() const +{ + const MLoopTri *looptris = BKE_mesh_runtime_looptri_ensure(this); + const int num_looptris = BKE_mesh_runtime_looptri_len(this); + return {looptris, num_looptris}; +} + /** * Ensure the array is large enough * |