From 6c7467e0da9cf241b1eac7dfe91e6aefe1d985ce Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 18 Aug 2014 17:35:51 +0600 Subject: Fix T41085: Blender crashes when using "spline" or "segments" for bevel curve factor. Root of the issue goes to the fact that bevel list calculation might drop some points if they're at the same position. This made spline length calculation goes wrong. Now the length of the bevel segments is stored in the bevel list, so values are always reliable. Initial patch by Lukas Treyer with some tweaks from me. --- source/blender/makesdna/DNA_curve_types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_curve_types.h') diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 16d85ab4d3b..87496fb491f 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -72,7 +72,7 @@ typedef struct Path { # # typedef struct BevPoint { - float vec[3], alfa, radius, weight; + float vec[3], alfa, radius, weight, offset; float sina, cosa; /* 2D Only */ float dir[3], tan[3], quat[4]; /* 3D Only */ short split_tag, dupe_tag; @@ -86,6 +86,8 @@ typedef struct BevList { int nr, dupe_nr; int poly, hole; int charidx; + int *segbevcount; + float *seglen; /* over-alloc */ BevPoint bevpoints[0]; -- cgit v1.2.3