diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-28 21:44:36 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-28 21:44:36 +0300 |
commit | 955748ab1e35d92d9c60ce81f43681e715768eb2 (patch) | |
tree | 2e17230c480acf37256355b240fedbe438d4c022 /source/blender | |
parent | 4cbcfd22f5d26e3cb520fa0ee0d85eedf018bab9 (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc index 4d6fb328ad9..e97badeb83a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc @@ -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; |