[Bf-blender-cvs] [955748ab1e3] master: Fix: Duplicate link search entries for attribute statistic node
Hans Goudey
noreply at git.blender.org
Tue Dec 28 19:44:47 CET 2021
Commit: 955748ab1e35d92d9c60ce81f43681e715768eb2
Author: Hans Goudey
Date: Tue Dec 28 12:44:36 2021 -0600
Branches: master
https://developer.blender.org/rB955748ab1e35d92d9c60ce81f43681e715768eb2
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.
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
===================================================================
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;
More information about the Bf-blender-cvs
mailing list