Fix: Duplicate link search entries for attribute statistic node
Using the output declarations is incorrect because there is a declaration for each type. Instead loop over the names directly, since it will make it easier to add an integer mode that only supports some of the outputs.
This commit is contained in:
@@ -148,8 +148,8 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
||||
});
|
||||
}
|
||||
else {
|
||||
for (const SocketDeclarationPtr &socket_decl : declaration.outputs()) {
|
||||
StringRefNull name = socket_decl->name();
|
||||
for (const StringRefNull name :
|
||||
{"Mean", "Median", "Sum", "Min", "Max", "Range", "Standard Deviation", "Variance"}) {
|
||||
params.add_item(IFACE_(name.c_str()), [node_type, name, type](LinkSearchOpParams ¶ms) {
|
||||
bNode &node = params.add_node(node_type);
|
||||
node.custom1 = *type;
|
||||
|
||||
Reference in New Issue
Block a user