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>2021-09-17 05:54:14 +0300
committerHans Goudey <h.goudey@me.com>2021-09-17 05:54:14 +0300
commit633c29fb7befed7a8fa4f209dd5187f551c91e37 (patch)
tree1a736b1fcc6beed3caf175751d0e8c00e0e1d03e /source/blender/modifiers
parent8e21d528cab98447fd072718a649906551de78d9 (diff)
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.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc4
1 files changed, 3 insertions, 1 deletions
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;
}