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:
authorJacques Lucke <jacques@blender.org>2022-09-24 12:41:08 +0300
committerJacques Lucke <jacques@blender.org>2022-09-24 12:41:08 +0300
commitc25df02ac3036449081701349d36d2f16b2c92f2 (patch)
tree29603afd3baced747546f4a841cbd4ab73bc7052 /source/blender/editors/curves
parent8422da13c929f65850a723794a27baa924929377 (diff)
Cleanup: simplify accessing mesh looptris
Diffstat (limited to 'source/blender/editors/curves')
-rw-r--r--source/blender/editors/curves/intern/curves_ops.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 54d91ccfc90..f52e11276e9 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -232,8 +232,7 @@ static void try_convert_single_object(Object &curves_ob,
BLI_SCOPED_DEFER([&]() { free_bvhtree_from_mesh(&surface_bvh); });
const Span<float3> positions_cu = curves.positions();
- const Span<MLoopTri> looptris{BKE_mesh_runtime_looptri_ensure(&surface_me),
- BKE_mesh_runtime_looptri_len(&surface_me)};
+ const Span<MLoopTri> looptris = surface_me.looptris();
if (looptris.is_empty()) {
*r_could_not_convert_some_curves = true;
@@ -545,8 +544,7 @@ static void snap_curves_to_surface_exec_object(Object &curves_ob,
const Mesh &surface_mesh = *static_cast<const Mesh *>(surface_ob.data);
const Span<MVert> verts = surface_mesh.verts();
const Span<MLoop> loops = surface_mesh.loops();
- const Span<MLoopTri> surface_looptris = {BKE_mesh_runtime_looptri_ensure(&surface_mesh),
- BKE_mesh_runtime_looptri_len(&surface_mesh)};
+ const Span<MLoopTri> surface_looptris = surface_mesh.looptris();
VArraySpan<float2> surface_uv_map;
if (curves_id.surface_uv_map != nullptr) {
const bke::AttributeAccessor surface_attributes = surface_mesh.attributes();