Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-23 05:52:48 +0300
committerHans Goudey <h.goudey@me.com>2022-02-23 05:52:48 +0300
commitf3ef0763b41155e6234343de900b207bb5b2e20d (patch)
treed765cb650df1fb3c587d011ba99e05cbdcecc37f /source/blender/blenkernel/intern/spline_base.cc
parentc6df7266c718555cde5a729dae1c6023ef2b3530 (diff)
Cleanup: Use new curves type enum for CurveEval
Though this is less aesthetically pleasing, it makes the transition to the new curves type (T95941) a bit simpler, and it has to be done anyway.
Diffstat (limited to 'source/blender/blenkernel/intern/spline_base.cc')
-rw-r--r--source/blender/blenkernel/intern/spline_base.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/spline_base.cc b/source/blender/blenkernel/intern/spline_base.cc
index d1c4756a3b9..dc5b1d28539 100644
--- a/source/blender/blenkernel/intern/spline_base.cc
+++ b/source/blender/blenkernel/intern/spline_base.cc
@@ -23,7 +23,7 @@ using blender::fn::GMutableSpan;
using blender::fn::GSpan;
using blender::fn::GVArray;
-Spline::Type Spline::type() const
+CurveType Spline::type() const
{
return type_;
}
@@ -34,15 +34,18 @@ void Spline::copy_base_settings(const Spline &src, Spline &dst)
dst.is_cyclic_ = src.is_cyclic_;
}
-static SplinePtr create_spline(const Spline::Type type)
+static SplinePtr create_spline(const CurveType type)
{
switch (type) {
- case Spline::Type::Poly:
+ case CURVE_TYPE_POLY:
return std::make_unique<PolySpline>();
- case Spline::Type::Bezier:
+ case CURVE_TYPE_BEZIER:
return std::make_unique<BezierSpline>();
- case Spline::Type::NURBS:
+ case CURVE_TYPE_NURBS:
return std::make_unique<NURBSpline>();
+ case CURVE_TYPE_CATMULL_ROM:
+ BLI_assert_unreachable();
+ return {};
}
BLI_assert_unreachable();
return {};