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:
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
index e4702035eec..da8d7bcf255 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
@@ -43,10 +43,12 @@ static void node_geo_exec(GeoNodeExecParams params)
bool only_poly = true;
geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) {
- if (geometry_set.has_curve()) {
+ if (geometry_set.has_curves()) {
if (only_poly) {
- for (const SplinePtr &spline : geometry_set.get_curve_for_read()->splines()) {
- if (ELEM(spline->type(), Spline::Type::Bezier, Spline::Type::NURBS)) {
+ const std::unique_ptr<CurveEval> curve = curves_to_curve_eval(
+ *geometry_set.get_curves_for_read());
+ for (const SplinePtr &spline : curve->splines()) {
+ if (ELEM(spline->type(), CURVE_TYPE_BEZIER, CURVE_TYPE_NURBS)) {
only_poly = false;
break;
}