[Bf-blender-cvs] [e6ba5ec37b0] temp-enum-socket: progress
Jacques Lucke
noreply at git.blender.org
Mon Nov 8 16:07:04 CET 2021
Commit: e6ba5ec37b0ab28870be1f96c8d6d69a1ad4b108
Author: Jacques Lucke
Date: Mon Nov 8 14:50:48 2021 +0100
Branches: temp-enum-socket
https://developer.blender.org/rBe6ba5ec37b0ab28870be1f96c8d6d69a1ad4b108
progress
===================================================================
M source/blender/blenkernel/intern/node.cc
M source/blender/nodes/function/nodes/node_fn_enum.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index f345e7a604e..5999bca30e0 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -5143,6 +5143,7 @@ static bool update_enum_inferencing(const NodeTreeRef &tree)
bNodeTree &btree = *tree.btree();
+ /* TODO: handle cyclic trees */
const NodeTreeRef::ToposortResult toposort_result = tree.toposort(
NodeTreeRef::ToposortDirection::RightToLeft);
diff --git a/source/blender/nodes/function/nodes/node_fn_enum.cc b/source/blender/nodes/function/nodes/node_fn_enum.cc
index 07d65ee00b5..643fe3c9c59 100644
--- a/source/blender/nodes/function/nodes/node_fn_enum.cc
+++ b/source/blender/nodes/function/nodes/node_fn_enum.cc
@@ -38,7 +38,8 @@ static void fn_node_enum_declare(NodeDeclarationBuilder &b)
const NodeFunctionEnum *storage = (const NodeFunctionEnum *)node->storage;
LISTBASE_FOREACH (const NodeFunctionEnumItem *, item, &storage->items) {
- b.add_output<decl::Bool>(N_("Bool"), "item_" + std::to_string(item->value));
+ b.add_output<decl::Bool>(item->name ? item->name : "Bool",
+ "item_" + std::to_string(item->value));
EnumPropertyItem enum_item = {0};
enum_item.identifier = BLI_strdup(item->name ? item->name : "");
enum_item.name = enum_item.identifier;
More information about the Bf-blender-cvs
mailing list