diff options
author | Hans Goudey <h.goudey@me.com> | 2021-05-12 19:46:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-05-12 19:46:13 +0300 |
commit | 50bf033d3f31b9939a79dea0652731f94da9a3ed (patch) | |
tree | 055a9ae0ca4bc1560b74b9ed58cd15fd87e5033f /source/blender/blenkernel/BKE_spline.hh | |
parent | 3ef01692c8f068ccc083dd3d6a49ed055fe7224b (diff) |
Cleanup: Splines: Add accessors to spline vector
Not allowing external direct access to the vector of splines in the
curve will help for things like reallocating custom data when a spline
is added or removed.
Diffstat (limited to 'source/blender/blenkernel/BKE_spline.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_spline.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_spline.hh b/source/blender/blenkernel/BKE_spline.hh index 35bbc23b21a..f1ffeb664f5 100644 --- a/source/blender/blenkernel/BKE_spline.hh +++ b/source/blender/blenkernel/BKE_spline.hh @@ -478,8 +478,15 @@ class PolySpline final : public Spline { * more of the data is stored in the splines, but also just to be different than the name in DNA. */ class CurveEval { + private: + blender::Vector<SplinePtr> splines_; + public: - blender::Vector<SplinePtr> splines; + blender::Span<SplinePtr> splines() const; + blender::MutableSpan<SplinePtr> splines(); + + void add_spline(SplinePtr spline); + void remove_splines(blender::IndexMask mask); CurveEval *copy(); |