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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_mask.cc')
-rw-r--r--source/blender/modifiers/intern/MOD_mask.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc
index 659a1625079..3ae300d22cf 100644
--- a/source/blender/modifiers/intern/MOD_mask.cc
+++ b/source/blender/modifiers/intern/MOD_mask.cc
@@ -49,6 +49,7 @@
#include "BLI_vector.hh"
using blender::Array;
+using blender::float3;
using blender::IndexRange;
using blender::ListBaseWrapper;
using blender::MutableSpan;
@@ -336,19 +337,12 @@ static void copy_masked_verts_to_new_mesh(const Mesh &src_mesh,
Span<int> vertex_map)
{
BLI_assert(src_mesh.totvert == vertex_map.size());
- const Span<MVert> src_verts = src_mesh.verts();
- MutableSpan<MVert> dst_verts = dst_mesh.verts_for_write();
-
for (const int i_src : vertex_map.index_range()) {
const int i_dst = vertex_map[i_src];
if (i_dst == -1) {
continue;
}
- const MVert &v_src = src_verts[i_src];
- MVert &v_dst = dst_verts[i_dst];
-
- v_dst = v_src;
CustomData_copy_data(&src_mesh.vdata, &dst_mesh.vdata, i_src, i_dst, 1);
}
}
@@ -374,11 +368,10 @@ static void add_interp_verts_copy_edges_to_new_mesh(const Mesh &src_mesh,
uint verts_add_num,
MutableSpan<int> r_edge_map)
{
+ using namespace blender;
BLI_assert(src_mesh.totvert == vertex_mask.size());
BLI_assert(src_mesh.totedge == r_edge_map.size());
- const Span<MVert> src_verts = src_mesh.verts();
const Span<MEdge> src_edges = src_mesh.edges();
- MutableSpan<MVert> dst_verts = dst_mesh.verts_for_write();
MutableSpan<MEdge> dst_edges = dst_mesh.edges_for_write();
uint vert_index = dst_mesh.totvert - verts_add_num;
@@ -418,11 +411,6 @@ static void add_interp_verts_copy_edges_to_new_mesh(const Mesh &src_mesh,
float weights[2] = {1.0f - fac, fac};
CustomData_interp(
&src_mesh.vdata, &dst_mesh.vdata, (int *)&e_src.v1, weights, nullptr, 2, vert_index);
- MVert &v = dst_verts[vert_index];
- const MVert &v1 = src_verts[e_src.v1];
- const MVert &v2 = src_verts[e_src.v2];
-
- interp_v3_v3v3(v.co, v1.co, v2.co, fac);
vert_index++;
}
}