From 070010e203f6cf9ac8fe30c8b60a5394df98e730 Mon Sep 17 00:00:00 2001 From: Fabian Schempp Date: Sun, 14 Mar 2021 23:11:36 +0100 Subject: 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 --- source/blender/modifiers/intern/MOD_nodes.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/modifiers') 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 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}; -- cgit v1.2.3