From c25df02ac3036449081701349d36d2f16b2c92f2 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Sat, 24 Sep 2022 11:41:08 +0200 Subject: Cleanup: simplify accessing mesh looptris --- source/blender/editors/sculpt_paint/curves_sculpt_density.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_density.cc') diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc index a37eb4bb560..1e598e6bc5b 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc @@ -132,8 +132,7 @@ struct DensityAddOperationExecutor { BKE_bvhtree_from_mesh_get(&surface_bvh_eval_, surface_eval_, BVHTREE_FROM_LOOPTRI, 2); BLI_SCOPED_DEFER([&]() { free_bvhtree_from_mesh(&surface_bvh_eval_); }); - surface_looptris_eval_ = {BKE_mesh_runtime_looptri_ensure(surface_eval_), - BKE_mesh_runtime_looptri_len(surface_eval_)}; + surface_looptris_eval_ = surface_eval_->looptris(); /* Find UV map. */ VArraySpan surface_uv_map; if (curves_id_orig_->surface_uv_map != nullptr) { @@ -265,8 +264,7 @@ struct DensityAddOperationExecutor { reinterpret_cast(CustomData_get_layer(&surface_orig_->ldata, CD_NORMAL)), surface_orig_->totloop}; - const Span surface_looptris_orig = {BKE_mesh_runtime_looptri_ensure(surface_orig_), - BKE_mesh_runtime_looptri_len(surface_orig_)}; + const Span surface_looptris_orig = surface_orig_->looptris(); const geometry::ReverseUVSampler reverse_uv_sampler{surface_uv_map, surface_looptris_orig}; geometry::AddCurvesOnMeshInputs add_inputs; -- cgit v1.2.3