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:
authorJacques Lucke <jacques@blender.org>2022-04-15 10:07:00 +0300
committerJacques Lucke <jacques@blender.org>2022-04-15 10:08:50 +0300
commit2839fe9a4d30c5737ab5075d0610c54568688fcb (patch)
treeb3d58776d83c985c6672ab1e3eb138e50448f8c3 /source/blender/blenkernel/intern/curve_eval.cc
parentdb6287873cd2c79741439f4d141c4b2db517d73e (diff)
Curves: initial geometry nodes support for curves objects
* Curves objects now support the geometry nodes modifier. * It's possible to use the curves object with the Object Info node. * The spreadsheet shows the curve data. The main thing holding this back currently is that the drawing code for the curves object is very incomplete. E.g. it resamples the curves always in the end, which is not expected for curves in general. Differential Revision: https://developer.blender.org/D14277
Diffstat (limited to 'source/blender/blenkernel/intern/curve_eval.cc')
-rw-r--r--source/blender/blenkernel/intern/curve_eval.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index a893359b911..d1ec9499298 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -402,7 +402,8 @@ std::unique_ptr<CurveEval> curves_to_curve_eval(const Curves &curves)
const IndexRange point_range = geometry.points_for_curve(curve_index);
std::unique_ptr<Spline> spline;
- switch (curve_types[curve_index]) {
+ /* #CurveEval does not support catmull rom curves, so convert those to poly splines. */
+ switch (std::max<int8_t>(1, curve_types[curve_index])) {
case CURVE_TYPE_POLY: {
spline = std::make_unique<PolySpline>();
spline->resize(point_range.size());