[Bf-blender-cvs] [4f16dad6b33] blender-v2.83-release: Fix T95137: Spline calc_length not working with just 1 NURB point
Jesse Yurkovich
noreply at git.blender.org
Tue Feb 22 12:18:05 CET 2022
Commit: 4f16dad6b33fc9aaf8f7a3829d96447bcd954311
Author: Jesse Yurkovich
Date: Thu Feb 3 22:39:57 2022 +1100
Branches: blender-v2.83-release
https://developer.blender.org/rB4f16dad6b33fc9aaf8f7a3829d96447bcd954311
Fix T95137: Spline calc_length not working with just 1 NURB point
The NURB case did not properly handle a curve with only 1 point.
Ref D13904
===================================================================
M source/blender/blenkernel/intern/curve.c
===================================================================
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 5282cbe4c67..f23c0654877 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -746,7 +746,7 @@ float BKE_nurb_calc_length(const Nurb *nu, int resolution)
pntsit = points + 3;
}
- while (--b) {
+ while (--b > 0) {
length += len_v3v3(prevpntsit, pntsit);
prevpntsit = pntsit;
pntsit += 3;
More information about the Bf-blender-cvs
mailing list