diff options
author | Hans Goudey <h.goudey@me.com> | 2021-05-08 02:16:15 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-05-08 02:16:15 +0300 |
commit | e46b9de6abbeb30f3267f656148c281b40cfad8e (patch) | |
tree | 62ee566569354fb3542519021a205b557a0052db /source/blender/blenkernel/intern/spline_bezier.cc | |
parent | 3185084efbe493bf232fb0de62b341ae2a2e2936 (diff) |
Fix: Curve to mesh node assert when last profile segment is vector
We need to always add a single point to the last cyclic segment that
completes the loop, because that includes the starting point of the
evaluated edge. The existing code forgot about that point.
Diffstat (limited to 'source/blender/blenkernel/intern/spline_bezier.cc')
-rw-r--r-- | source/blender/blenkernel/intern/spline_bezier.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/spline_bezier.cc b/source/blender/blenkernel/intern/spline_bezier.cc index 4d4e1b386c4..20226dc3ed2 100644 --- a/source/blender/blenkernel/intern/spline_bezier.cc +++ b/source/blender/blenkernel/intern/spline_bezier.cc @@ -204,7 +204,7 @@ int BezierSpline::evaluated_points_size() const const int last_offset = this->control_point_offsets().last(); if (is_cyclic_ && points_len > 1) { - return last_offset + (this->segment_is_vector(points_len - 1) ? 0 : resolution_); + return last_offset + (this->segment_is_vector(points_len - 1) ? 1 : resolution_); } return last_offset + 1; |