Fix T96146: Subdivide curve node uninitialized dangling handles

Handles of non-cyclic bezier curves were not initialized.
Now properly copy the dangling handle positions and types
from the source curve.
This commit is contained in:
Hans Goudey 2022-03-08 15:45:17 -06:00
parent b8960267dd
commit 521d4190a0
Notes: blender-bot 2023-02-14 11:25:11 +01:00
Referenced by issue #96146, Subdivide and cycle Bezier curve
1 changed files with 4 additions and 0 deletions

View File

@ -206,6 +206,10 @@ static void subdivide_bezier_spline(const BezierSpline &src,
}
else {
dst_positions.last() = src_positions.last();
dst_type_left.first() = src.handle_types_left().first();
dst_type_right.last() = src.handle_types_right().last();
dst_handles_left.first() = src_handles_left.first();
dst_handles_right.last() = src_handles_right.last();
}
}