diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-28 19:50:55 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-28 19:50:55 +0300 |
commit | 5b1ec08f040ab238b2f4d80fa3bc7b169eeb3820 (patch) | |
tree | 113da35e04e3e251c9a0ab1f9b2bb3305755f313 /source/blender/nodes | |
parent | 2d7957727c9be8af2689f1cff1ebed590238cb8e (diff) |
Fix T93546: Fill curve node ignores last point of non-cylic curves
The node is meant to consider all curves cyclic, which means that it
shouldn't account for one fewer segment on non-cyclic curves.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc index f29b193d98b..c9a8dba55b2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc @@ -48,20 +48,18 @@ static meshintersect::CDT_result<double> do_cdt(const bke::CurvesGeometry &curve input.vert.reinitialize(curves.evaluated_points_num()); input.face.reinitialize(curves.curves_num()); - VArray<bool> cyclic = curves.cyclic(); Span<float3> positions = curves.evaluated_positions(); for (const int i_curve : curves.curves_range()) { const IndexRange points = curves.evaluated_points_for_curve(i_curve); - const int segment_size = bke::curves::curve_segment_size(points.size(), cyclic[i_curve]); for (const int i : points) { input.vert[i] = double2(positions[i].x, positions[i].y); } - input.face[i_curve].resize(segment_size); + input.face[i_curve].resize(points.size()); MutableSpan<int> face_verts = input.face[i_curve]; - for (const int i : IndexRange(segment_size)) { + for (const int i : face_verts.index_range()) { face_verts[i] = points[i]; } } |