From 038c6e229c4fb1518f726d7f6a828be026bae857 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 15 May 2021 17:44:33 -0500 Subject: Splines: Convenience methods for point offsets of multiple splines Since spline data is stored separately for each spline, the data often needs to be flattened into a separate array. It's helpful to have the necessarily-sequential part of that split off into a separate method. I've found myself using functions like these in quite a few places. --- source/blender/blenkernel/BKE_spline.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_spline.hh') diff --git a/source/blender/blenkernel/BKE_spline.hh b/source/blender/blenkernel/BKE_spline.hh index acff2843806..35f21ccb897 100644 --- a/source/blender/blenkernel/BKE_spline.hh +++ b/source/blender/blenkernel/BKE_spline.hh @@ -493,6 +493,9 @@ class CurveEval { void translate(const blender::float3 &translation); void transform(const blender::float4x4 &matrix); void bounds_min_max(blender::float3 &min, blender::float3 &max, const bool use_evaluated) const; + + blender::Array control_point_offsets() const; + blender::Array evaluated_point_offsets() const; }; std::unique_ptr curve_eval_from_dna_curve(const Curve &curve); -- cgit v1.2.3