From a82c90ca558004a81bbdd94bf8c991a5e8eb4781 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 19 Jun 2021 08:51:00 +0200 Subject: [PATCH] Tweak CylinderMesh `rings` property hint to allow a value of 0 A value of 0 rings is valid and results in a non-subdivided cylinder. Compared to the previous lowest allowed value (1), a value of 0 halves the triangle count in any cylinder. --- scene/resources/primitive_meshes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index bc249c6680..f1856a64c5 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -890,7 +890,7 @@ void CylinderMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_rings", "get_rings"); } void CylinderMesh::set_top_radius(const float p_radius) {