From 633c29fb7befed7a8fa4f209dd5187f551c91e37 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 16 Sep 2021 21:54:14 -0500 Subject: Fix: Nodes modifier ignores input value with new property missing An issue with the previous commit-- the default value of the type was used instead of the property value when the "use_attribute" property was missing. --- source/blender/modifiers/intern/MOD_nodes.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 011890f4d43..6b976b016e1 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -643,6 +643,7 @@ static void initialize_group_input(NodesModifierData &nmd, if (!socket_type_has_attribute_toggle(socket)) { init_socket_cpp_value_from_property( *property, static_cast(socket.type), r_value); + return; } const IDProperty *property_use_attribute = IDP_GetPropertyFromGroup( @@ -650,7 +651,8 @@ static void initialize_group_input(NodesModifierData &nmd, const IDProperty *property_attribute_name = IDP_GetPropertyFromGroup( nmd.settings.properties, (socket.identifier + attribute_name_suffix).c_str()); if (property_use_attribute == nullptr || property_attribute_name == nullptr) { - socket.typeinfo->get_geometry_nodes_cpp_value(socket, r_value); + init_socket_cpp_value_from_property( + *property, static_cast(socket.type), r_value); return; } -- cgit v1.2.3