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:
authorHans Goudey <h.goudey@me.com>2022-09-18 05:12:04 +0300
committerHans Goudey <h.goudey@me.com>2022-09-18 05:12:25 +0300
commit641bbc820f94668aa0e5beb972d1368475041cc4 (patch)
tree899712f5500756f154e2b34a93f7acf7e2342728 /source/blender/blenkernel/intern/geometry_component_curves.cc
parent0bdb5239c1a55e72adf3d3d7c491df3d86cd0b09 (diff)
Curves: Don't allow resolutions less than 1
While this worked, the result for curves with a resolution of zero was just a single evaluated point, which isn't useful or intuitive. Using the attribute validation from 8934f00ac5701ea34, make sure users can't set values 0 or less.
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_curves.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curves.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc
index d8cfe1374dc..4ace68546ac 100644
--- a/source/blender/blenkernel/intern/geometry_component_curves.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curves.cc
@@ -548,7 +548,7 @@ static ComponentAttributeProviders create_attribute_providers_for_curve()
static const fn::CustomMF_SI_SO<int, int> resolution_clamp{
"Resolution Validate",
- [](int value) { return std::max<int>(value, 0); },
+ [](int value) { return std::max<int>(value, 1); },
fn::CustomMF_presets::AllSpanOrSingle()};
static BuiltinCustomDataLayerProvider resolution("resolution",
ATTR_DOMAIN_CURVE,