diff options
author | Julian Eisel <julian@blender.org> | 2021-09-15 23:34:20 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-09-15 23:34:20 +0300 |
commit | da9be470b546928e3e4320003b333d0aad1c9073 (patch) | |
tree | 3879b762dc226f0b6a55d8e5bdafcfba7dc0c3b9 /source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc | |
parent | ad7588600c35423b2908756afd694331f08aeb20 (diff) | |
parent | 28bd74c18650a8362bc791df602097967ff5efdf (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.cc | 2 |
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; |