Geometry Nodes: Delete value moving for drag and drop group inputs
Initially, this function was for node data. At Simon's suggestion, it was extended to a node group inputs as well. However, this overlaps with another function. It has been missing for a while, but has recently been fixed by https://projects.blender.org/blender/blender/pulls/107179. Now this functionality is redundant. Pull Request: https://projects.blender.org/blender/blender/pulls/107255
This commit is contained in:
@@ -2430,29 +2430,7 @@ bNode *node_copy_with_mapping(bNodeTree *dst_tree,
|
||||
return node_dst;
|
||||
}
|
||||
|
||||
static void for_each_node_group_instance(Main &bmain,
|
||||
const bNodeTree &node_group,
|
||||
const Span<int> tree_types_to_lookup,
|
||||
const FunctionRef<void(bNode &)> func)
|
||||
{
|
||||
LISTBASE_FOREACH (bNodeTree *, other_group, &bmain.nodetrees) {
|
||||
if (!tree_types_to_lookup.contains(other_group->type)) {
|
||||
continue;
|
||||
}
|
||||
if (other_group == &node_group) {
|
||||
continue;
|
||||
}
|
||||
|
||||
other_group->ensure_topology_cache();
|
||||
for (bNode *node : other_group->group_nodes()) {
|
||||
if (node->id == &node_group.id) {
|
||||
func(*node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void node_socket_move_default_value(Main &bmain,
|
||||
void node_socket_move_default_value(Main & /*bmain*/,
|
||||
bNodeTree &tree,
|
||||
bNodeSocket &src,
|
||||
bNodeSocket &dst)
|
||||
@@ -2490,14 +2468,6 @@ void node_socket_move_default_value(Main &bmain,
|
||||
dst_values.append(&dst_node.id);
|
||||
break;
|
||||
}
|
||||
case NODE_GROUP_INPUT: {
|
||||
for_each_node_group_instance(bmain, tree, {NTREE_GEOMETRY}, [&](bNode &node_group) {
|
||||
bNodeSocket &socket = node_group.input_by_identifier(dst.identifier);
|
||||
Image **tmp_dst_value = &socket.default_value_typed<bNodeSocketValueImage>()->value;
|
||||
dst_values.append(reinterpret_cast<ID **>(tmp_dst_value));
|
||||
});
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user