WIP: Closures and deferred evaluation for geometry nodes #107842

Draft
Lukas Tönne wants to merge 35 commits from LukasTonne/blender:geometry-nodes-closures into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 7 additions and 2 deletions
Showing only changes of commit d7a6067f0a - Show all commits

View File

@ -135,6 +135,8 @@ static void node_socket_set_typeinfo(bNodeTree *ntree,
bNodeSocket *sock,
bNodeSocketType *typeinfo);
} // namespace blender::bke
/* ************ NODE FUNCTION SIGNATURE *************** */
blender::Span<bNodeFunctionParameter> bNodeFunctionSignature::inputs_span() const
@ -509,6 +511,8 @@ void nodeFunctionSignatureMoveParameter(bNodeFunctionSignature *sig,
}
}
namespace blender::bke {
static void ntree_init_data(ID *id)
{
bNodeTree *ntree = reinterpret_cast<bNodeTree *>(id);
@ -1340,7 +1344,7 @@ static void lib_link_node_socket(BlendLibReader *reader, ID *self_id, bNodeSocke
}
case SOCK_FUNCTION: {
BLO_read_id_address(
reader, lib, &sock->default_value_typed<bNodeSocketValueFunction>()->value);
reader, self_id, &sock->default_value_typed<bNodeSocketValueFunction>()->value);
break;
}
case SOCK_FLOAT:
@ -3253,7 +3257,8 @@ void nodeInternalRelink(bNodeTree *ntree, bNode *node)
/* remove the link that would be the same as the relinked one */
LISTBASE_FOREACH_MUTABLE (bNodeLink *, link_to_compare, &ntree->links) {
if (link_to_compare->fromsock == fromlink->fromsock &&
link_to_compare->tosock == link->tosock) {
link_to_compare->tosock == link->tosock)
{
blender::bke::adjust_multi_input_indices_after_removed_link(
ntree, link_to_compare->tosock, link_to_compare->multi_input_socket_index);
duplicate_links_to_remove.append_non_duplicates(link_to_compare);