diff options
author | Jacques Lucke <jacques@blender.org> | 2021-06-08 12:50:18 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-06-08 12:51:45 +0300 |
commit | 89d0cc3a0ce013f4a68d8858d4ed9792bd23b43b (patch) | |
tree | 41e7d8c04ed3164c6a7c3308048eeab555ac180f /source | |
parent | e54a4b355efba1bf72e15c7af061a150a7782f8c (diff) |
Fix T88719: Attribute Remove node input field does nothing
An unlinked multi-input socket was not handled correctly.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes_evaluator.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc index 27d3da911a1..7f80afde99b 100644 --- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc +++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc @@ -1474,6 +1474,13 @@ Vector<GMutablePointer> NodeParamsProvider::extract_multi_input(StringRef identi } BLI_assert_unreachable(); }); + if (ret_values.is_empty()) { + /* If the socket is not linked, we just use the value from the socket itself. */ + BLI_assert(multi_value.items.size() == 1); + MultiInputValueItem &item = multi_value.items[0]; + BLI_assert(item.origin == socket); + ret_values.append({*input_state.type, item.value}); + } multi_value.items.clear(); return ret_values; } |