Geometry Nodes: use aligned sockets in bake node
This aligns the corresponding input and output sockets in the Bake node. A similar change has been done for simulation and repeat zones before in #118335. Pull Request: https://projects.blender.org/blender/blender/pulls/121496
This commit is contained in:
@@ -42,6 +42,9 @@ NODE_STORAGE_FUNCS(NodeGeometryBake)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.use_custom_socket_order();
|
||||
b.allow_any_socket_order();
|
||||
|
||||
const bNode *node = b.node_or_null();
|
||||
if (!node) {
|
||||
return;
|
||||
@@ -54,7 +57,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
const StringRef name = item.name;
|
||||
const std::string identifier = BakeItemsAccessor::socket_identifier_for_item(item);
|
||||
auto &input_decl = b.add_input(socket_type, name, identifier);
|
||||
auto &output_decl = b.add_output(socket_type, name, identifier);
|
||||
auto &output_decl = b.add_output(socket_type, name, identifier).align_with_previous();
|
||||
if (socket_type_supports_fields(socket_type)) {
|
||||
input_decl.supports_field();
|
||||
if (item.flag & GEO_NODE_BAKE_ITEM_IS_ATTRIBUTE) {
|
||||
@@ -66,7 +69,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
}
|
||||
}
|
||||
b.add_input<decl::Extend>("", "__extend__");
|
||||
b.add_output<decl::Extend>("", "__extend__");
|
||||
b.add_output<decl::Extend>("", "__extend__").align_with_previous();
|
||||
}
|
||||
|
||||
static void node_init(bNodeTree * /*tree*/, bNode *node)
|
||||
|
||||
Reference in New Issue
Block a user