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:
authorJacques Lucke <jacques@blender.org>2021-09-07 17:06:25 +0300
committerJacques Lucke <jacques@blender.org>2021-09-07 17:07:18 +0300
commit73ef2fc2f4e43a56d4b6965845534cc4df76610a (patch)
tree8962c9393a458fdfdefca4d4fb3e624ead5c381c /source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
parent08acbdc1ff75607001f770b4281f53ec87449b7f (diff)
Fix T91093: off by one error in when resampling curve
The bug existed in the Curve Resample and Curve to Points node. Differential Revision: https://developer.blender.org/D12416
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
index 052eb92d269..17cd8e987a7 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
@@ -101,7 +101,7 @@ static Array<int> calculate_spline_point_offsets(GeoNodeExecParams &params,
int offset = 0;
for (const int i : IndexRange(size)) {
offsets[i] = offset;
- offset += splines[i]->length() / resolution;
+ offset += splines[i]->length() / resolution + 1;
}
offsets.last() = offset;
return offsets;