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:
authorJulian Eisel <julian@blender.org>2021-09-15 23:34:20 +0300
committerJulian Eisel <julian@blender.org>2021-09-15 23:34:20 +0300
commitda9be470b546928e3e4320003b333d0aad1c9073 (patch)
tree3879b762dc226f0b6a55d8e5bdafcfba7dc0c3b9 /source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
parentad7588600c35423b2908756afd694331f08aeb20 (diff)
parent28bd74c18650a8362bc791df602097967ff5efdf (diff)
Merge branch 'master' into temp-cocoa-scroll-acceleration-fixtemp-cocoa-scroll-acceleration-fix
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
index 169a169bb1c..0803d43e5c3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
@@ -41,7 +41,7 @@ static std::unique_ptr<CurveEval> create_spiral_curve(const float rotations,
std::unique_ptr<CurveEval> curve = std::make_unique<CurveEval>();
std::unique_ptr<PolySpline> spline = std::make_unique<PolySpline>();
- const int totalpoints = resolution * rotations;
+ const int totalpoints = std::max(int(resolution * rotations), 1);
const float delta_radius = (end_radius - start_radius) / (float)totalpoints;
float radius = start_radius;
const float delta_height = height / (float)totalpoints;