From cb92ff7b2d50659f97ff363c842bf109310ff0aa Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 13 Jan 2023 12:49:53 -0600 Subject: [PATCH] Geometry Nodes: Only set soft range for modifier properties Similar to the corresponding properties on node sockets, only adjust the soft range. Because group nodes only have soft limits, groups should generally be able to accept these inputs anyway. The benefit of only using a soft range is that it allows choosing a more user- friendly default range while keeping flexibility. --- source/blender/modifiers/intern/MOD_nodes.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 2c5e02fbbe5..d9198ba9025 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -442,8 +442,8 @@ id_property_create_from_socket(const bNodeSocket &socket) auto property = bke::idprop::create(socket.identifier, value->value); IDPropertyUIDataFloat *ui_data = (IDPropertyUIDataFloat *)IDP_ui_data_ensure(property.get()); ui_data->base.rna_subtype = value->subtype; - ui_data->min = ui_data->soft_min = double(value->min); - ui_data->max = ui_data->soft_max = double(value->max); + ui_data->soft_min = double(value->min); + ui_data->soft_max = double(value->max); ui_data->default_value = value->value; return property; } @@ -453,8 +453,8 @@ id_property_create_from_socket(const bNodeSocket &socket) auto property = bke::idprop::create(socket.identifier, value->value); IDPropertyUIDataInt *ui_data = (IDPropertyUIDataInt *)IDP_ui_data_ensure(property.get()); ui_data->base.rna_subtype = value->subtype; - ui_data->min = ui_data->soft_min = value->min; - ui_data->max = ui_data->soft_max = value->max; + ui_data->soft_min = value->min; + ui_data->soft_max = value->max; ui_data->default_value = value->value; return property; } @@ -465,8 +465,8 @@ id_property_create_from_socket(const bNodeSocket &socket) socket.identifier, Span{value->value[0], value->value[1], value->value[2]}); IDPropertyUIDataFloat *ui_data = (IDPropertyUIDataFloat *)IDP_ui_data_ensure(property.get()); ui_data->base.rna_subtype = value->subtype; - ui_data->min = ui_data->soft_min = double(value->min); - ui_data->max = ui_data->soft_max = double(value->max); + ui_data->soft_min = double(value->min); + ui_data->soft_max = double(value->max); ui_data->default_array = (double *)MEM_mallocN(sizeof(double[3]), "mod_prop_default"); ui_data->default_array_len = 3; for (const int i : IndexRange(3)) {