[Bf-blender-cvs] [53f92279cb4] geometry-nodes-curve-support: Geometry Nodes Curves: Keep resolution attribute above 0
Hans Goudey
noreply at git.blender.org
Sun Apr 4 20:23:00 CEST 2021
Commit: 53f92279cb46a82ed1a937f539a87b4abd31fff2
Author: Hans Goudey
Date: Sun Apr 4 13:22:29 2021 -0500
Branches: geometry-nodes-curve-support
https://developer.blender.org/rB53f92279cb46a82ed1a937f539a87b4abd31fff2
Geometry Nodes Curves: Keep resolution attribute above 0
===================================================================
M source/blender/blenkernel/intern/geometry_component_curve.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 9867df3f27b..71c3b39a4ba 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -206,7 +206,7 @@ static int get_spline_resolution(Spline *const &spline)
static void set_spline_resolution(Spline *&spline, const int &resolution)
{
- spline->set_resolution(resolution);
+ spline->set_resolution(std::max(resolution, 1));
}
static ReadAttributePtr make_resolution_read_attribute(const DCurve &curve)
More information about the Bf-blender-cvs
mailing list