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/sculpt_paint/curves_sculpt_density.cc
parent8422da13c929f65850a723794a27baa924929377 (diff)
Cleanup: simplify accessing mesh looptris
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_density.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_density.cc6
1 files changed, 2 insertions, 4 deletions
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<float2> surface_uv_map;
if (curves_id_orig_->surface_uv_map != nullptr) {
@@ -265,8 +264,7 @@ struct DensityAddOperationExecutor {
reinterpret_cast<const float3 *>(CustomData_get_layer(&surface_orig_->ldata, CD_NORMAL)),
surface_orig_->totloop};
- const Span<MLoopTri> surface_looptris_orig = {BKE_mesh_runtime_looptri_ensure(surface_orig_),
- BKE_mesh_runtime_looptri_len(surface_orig_)};
+ const Span<MLoopTri> surface_looptris_orig = surface_orig_->looptris();
const geometry::ReverseUVSampler reverse_uv_sampler{surface_uv_map, surface_looptris_orig};
geometry::AddCurvesOnMeshInputs add_inputs;