[Bf-blender-cvs] [633c29fb7be] master: Fix: Nodes modifier ignores input value with new property missing
Hans Goudey
noreply at git.blender.org
Fri Sep 17 04:54:28 CEST 2021
Commit: 633c29fb7befed7a8fa4f209dd5187f551c91e37
Author: Hans Goudey
Date: Thu Sep 16 21:54:14 2021 -0500
Branches: master
https://developer.blender.org/rB633c29fb7befed7a8fa4f209dd5187f551c91e37
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.
===================================================================
M source/blender/modifiers/intern/MOD_nodes.cc
===================================================================
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<eNodeSocketDatatype>(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<eNodeSocketDatatype>(socket.type), r_value);
return;
}
More information about the Bf-blender-cvs
mailing list