Splines: Add resize method to CurveEval
This helps when adding splines to a new curve in parallel.
This commit is contained in:
parent
6bb980b0f4
commit
732e8c723e
|
@ -535,6 +535,7 @@ struct CurveEval {
|
|||
blender::Span<SplinePtr> splines() const;
|
||||
blender::MutableSpan<SplinePtr> splines();
|
||||
|
||||
void resize(const int size);
|
||||
void add_spline(SplinePtr spline);
|
||||
void remove_splines(blender::IndexMask mask);
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue