Geometry Nodes: remove default geometry in bake node

This is sometimes annoying now, because sometimes one wants to bake stuff
without a geometry. Most notably, volume grids. It's still very easy to bake
geometries though. Link-drag-search from a geometry socket still adds the
geometry bake socket automatically.

Pull Request: https://projects.blender.org/blender/blender/pulls/147519
This commit is contained in:
Jacques Lucke
2025-10-07 15:35:59 +02:00
parent 610555dbe3
commit 5df3dd9768

View File

@@ -95,16 +95,6 @@ static void node_declare(NodeDeclarationBuilder &b)
static void node_init(bNodeTree * /*tree*/, bNode *node)
{
NodeGeometryBake *data = MEM_callocN<NodeGeometryBake>(__func__);
data->items = MEM_calloc_arrayN<NodeGeometryBakeItem>(1, __func__);
data->items_num = 1;
NodeGeometryBakeItem &item = data->items[0];
item.name = BLI_strdup(DATA_("Geometry"));
item.identifier = data->next_identifier++;
item.attribute_domain = int16_t(AttrDomain::Point);
item.socket_type = SOCK_GEOMETRY;
node->storage = data;
}
@@ -522,17 +512,9 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_gather_link_searches(GatherLinkSearchOpParams &params)
{
const eNodeSocketDatatype type = eNodeSocketDatatype(params.other_socket().type);
if (type == SOCK_GEOMETRY) {
params.add_item(IFACE_("Geometry"), [](LinkSearchOpParams &params) {
bNode &node = params.add_node("GeometryNodeBake");
params.connect_available_socket(node, "Geometry");
});
return;
}
if (!BakeItemsAccessor::supports_socket_type(type, params.node_tree().type)) {
return;
}
params.add_item(
IFACE_("Value"),
[type](LinkSearchOpParams &params) {