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:
authorHans Goudey <h.goudey@me.com>2021-05-08 02:16:15 +0300
committerHans Goudey <h.goudey@me.com>2021-05-08 02:16:15 +0300
commite46b9de6abbeb30f3267f656148c281b40cfad8e (patch)
tree62ee566569354fb3542519021a205b557a0052db /source/blender/blenkernel
parent3185084efbe493bf232fb0de62b341ae2a2e2936 (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')
-rw-r--r--source/blender/blenkernel/intern/spline_bezier.cc2
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;