Commit: 3cfccf11997e9dc2f07000b9d802f0a6038e8ec1
Author: Jesse Yurkovich
Date: Thu Feb 3 22:39:57 2022 +1100
Branches: blender-v2.93-release
https://developer.blender.org/rB3cfccf11997e9dc2f07000b9d802f0a6038e8ec1
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 37cd62c3bc8..4fc4f3e0bcd 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -915,7 +915,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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs