diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2022-06-01 15:55:26 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-06-01 15:55:26 +0300 |
commit | c667069a12108569a6064ce3736d055ca52d43a7 (patch) | |
tree | ca226ba88d5e863f297592feb153481168a43e2b /source/blender | |
parent | ae0b68e129e8eb13d49661c72b80640b6ca7cf42 (diff) | |
parent | 7dd0258d4a439335fd69a4f0d1716a67c926ffe8 (diff) |
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc index 57f8ee395a9..cde40319388 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc @@ -701,12 +701,12 @@ static void copy_stable_id_edges(const Mesh &mesh, VArray_Span<int> src{src_attribute.varray.typed<int>()}; MutableSpan<int> dst = dst_attribute.as_span<int>(); threading::parallel_for(IndexRange(selection.size()), 1024, [&](IndexRange range) { - for (const int i_edge : range) { - const IndexRange edge_range = range_for_offsets_index(edge_offsets, i_edge); + for (const int i_selection : range) { + const IndexRange edge_range = range_for_offsets_index(edge_offsets, i_selection); if (edge_range.size() == 0) { continue; } - const MEdge &edge = edges[i_edge]; + const MEdge &edge = edges[selection[i_selection]]; const IndexRange vert_range = {edge_range.start() * 2, edge_range.size() * 2}; dst[vert_range[0]] = src[edge.v1]; @@ -750,9 +750,9 @@ static void duplicate_edges(GeometrySet &geometry_set, Array<int> vert_orig_indices(edge_offsets.last() * 2); threading::parallel_for(selection.index_range(), 1024, [&](IndexRange range) { - for (const int i_edge : range) { - const MEdge &edge = edges[i_edge]; - const IndexRange edge_range = range_for_offsets_index(edge_offsets, i_edge); + for (const int i_selection : range) { + const MEdge &edge = edges[selection[i_selection]]; + const IndexRange edge_range = range_for_offsets_index(edge_offsets, i_selection); const IndexRange vert_range(edge_range.start() * 2, edge_range.size() * 2); for (const int i_duplicate : IndexRange(edge_range.size())) { @@ -763,8 +763,8 @@ static void duplicate_edges(GeometrySet &geometry_set, }); threading::parallel_for(selection.index_range(), 1024, [&](IndexRange range) { - for (const int i_edge : range) { - const IndexRange edge_range = range_for_offsets_index(edge_offsets, i_edge); + for (const int i_selection : range) { + const IndexRange edge_range = range_for_offsets_index(edge_offsets, i_selection); const IndexRange vert_range(edge_range.start() * 2, edge_range.size() * 2); for (const int i_duplicate : IndexRange(edge_range.size())) { MEdge &new_edge = new_edges[edge_range[i_duplicate]]; |