diff options
author | Hans Goudey <h.goudey@me.com> | 2021-06-16 00:24:11 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-06-16 00:24:11 +0300 |
commit | 732e8c723e5b677f371bfb6425986ac22386f93a (patch) | |
tree | 4cc4c56a12b86e6296ddb1fa87283956dafc2be7 /source/blender/blenkernel/intern/curve_eval.cc | |
parent | 6bb980b0f43721a5f87185cbac11d1bd0919a490 (diff) |
Splines: Add resize method to CurveEval
This helps when adding splines to a new curve in parallel.
Diffstat (limited to 'source/blender/blenkernel/intern/curve_eval.cc')
-rw-r--r-- | source/blender/blenkernel/intern/curve_eval.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc index 9cafe1124b1..c9408cf4fcd 100644 --- a/source/blender/blenkernel/intern/curve_eval.cc +++ b/source/blender/blenkernel/intern/curve_eval.cc @@ -42,6 +42,12 @@ blender::MutableSpan<SplinePtr> CurveEval::splines() return splines_; } +void CurveEval::resize(const int size) +{ + splines_.resize(size); + attributes.reallocate(size); +} + /** * \warning Call #reallocate on the spline's attributes after adding all splines. */ |