diff options
Diffstat (limited to 'source/blender/blenkernel/intern/spline_bezier.cc')
-rw-r--r-- | source/blender/blenkernel/intern/spline_bezier.cc | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/spline_bezier.cc b/source/blender/blenkernel/intern/spline_bezier.cc index 4be3ba8576e..3c6cf2c78cf 100644 --- a/source/blender/blenkernel/intern/spline_bezier.cc +++ b/source/blender/blenkernel/intern/spline_bezier.cc @@ -31,6 +31,14 @@ SplinePtr BezierSpline::copy() const return std::make_unique<BezierSpline>(*this); } +SplinePtr BezierSpline::copy_settings() const +{ + std::unique_ptr<BezierSpline> copy = std::make_unique<BezierSpline>(); + copy_base_settings(*this, *copy); + copy->resolution_ = resolution_; + return copy; +} + int BezierSpline::size() const { const int size = positions_.size(); @@ -59,18 +67,18 @@ void BezierSpline::set_resolution(const int value) * \warning Call #reallocate on the spline's attributes after adding all points. */ void BezierSpline::add_point(const float3 position, - const HandleType handle_type_start, - const float3 handle_position_start, - const HandleType handle_type_end, - const float3 handle_position_end, + const HandleType handle_type_left, + const float3 handle_position_left, + const HandleType handle_type_right, + const float3 handle_position_right, const float radius, const float tilt) { - handle_types_left_.append(handle_type_start); - handle_positions_left_.append(handle_position_start); + handle_types_left_.append(handle_type_left); + handle_positions_left_.append(handle_position_left); positions_.append(position); - handle_types_right_.append(handle_type_end); - handle_positions_right_.append(handle_position_end); + handle_types_right_.append(handle_type_right); + handle_positions_right_.append(handle_position_right); radii_.append(radius); tilts_.append(tilt); this->mark_cache_invalid(); |