diff options
author | Fabian Schempp <fabianschempp@googlemail.com> | 2021-03-15 01:11:36 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2021-03-15 01:11:36 +0300 |
commit | 070010e203f6cf9ac8fe30c8b60a5394df98e730 (patch) | |
tree | 75d78e6b5e7fea7aaca8a53a538998d4d2d9473f /source/blender/modifiers/intern/MOD_nodes.cc | |
parent | a01fb22f28df21acab103a5216591355b1dc85d7 (diff) |
Nodes: multi-input support for Attribute Remove node
This patch adds multi-input support to the Attribute Remove node.
Reviewed By: Hans Goudey
Differential Revision: https://developer.blender.org/D10698
Diffstat (limited to 'source/blender/modifiers/intern/MOD_nodes.cc')
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index f8242c87bd3..504dd434b1b 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -304,17 +304,17 @@ class GeometryNodesEvaluator { Vector<DSocket> from_sockets; socket_to_compute.foreach_origin_socket([&](DSocket socket) { from_sockets.append(socket); }); - /* Multi-input sockets contain a vector of inputs. */ - if (socket_to_compute->is_multi_input_socket()) { - return this->get_inputs_from_incoming_links(socket_to_compute, from_sockets); - } - if (from_sockets.is_empty()) { /* The input is not connected, use the value from the socket itself. */ const CPPType &type = *blender::nodes::socket_cpp_type_get(*socket_to_compute->typeinfo()); return {get_unlinked_input_value(socket_to_compute, type)}; } + /* Multi-input sockets contain a vector of inputs. */ + if (socket_to_compute->is_multi_input_socket()) { + return this->get_inputs_from_incoming_links(socket_to_compute, from_sockets); + } + const DSocket from_socket = from_sockets[0]; GMutablePointer value = this->get_input_from_incoming_link(socket_to_compute, from_socket); return {value}; |