[Bf-blender-cvs] [59b777eedd2] blender-v3.1-release: Fix T95137: Spline calc_length not working with just 1 NURB point
Jesse Yurkovich
noreply at git.blender.org
Thu Feb 3 12:42:30 CET 2022
Commit: 59b777eedd23d34a7d723a7b73032d463077f1b3
Author: Jesse Yurkovich
Date: Thu Feb 3 22:39:57 2022 +1100
Branches: blender-v3.1-release
https://developer.blender.org/rB59b777eedd23d34a7d723a7b73032d463077f1b3
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.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc
index 70edaccb244..dda2b5076a8 100644
--- a/source/blender/blenkernel/intern/curve.cc
+++ b/source/blender/blenkernel/intern/curve.cc
@@ -899,7 +899,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