Fix #120874: Geometry Nodes: propagate attribute usage through muted node
For example, the `Bake` node generally does not propagate any anonymous attributes. That's true regardless of whether it is baked or not. However, if it is muted, the attributes should be propagated. Pull Request: https://projects.blender.org/blender/blender/pulls/120887
This commit is contained in:
committed by
Jacques Lucke
parent
32ed9bb107
commit
d1f26dad9b
@@ -61,6 +61,21 @@ static const aal::RelationsInNode &get_relations_in_node(const bNode &node, Reso
|
||||
return geometry_relations;
|
||||
}
|
||||
}
|
||||
if (node.is_muted()) {
|
||||
aal::RelationsInNode &relations = scope.construct<aal::RelationsInNode>();
|
||||
for (const bNodeLink &link : node.internal_links()) {
|
||||
const bNodeSocket &input = *link.fromsock;
|
||||
const bNodeSocket &output = *link.tosock;
|
||||
if (socket_is_field(input) || socket_is_field(output)) {
|
||||
relations.reference_relations.append({input.index(), output.index()});
|
||||
}
|
||||
else if (input.type == SOCK_GEOMETRY) {
|
||||
BLI_assert(input.type == output.type);
|
||||
relations.propagate_relations.append({input.index(), output.index()});
|
||||
}
|
||||
}
|
||||
return relations;
|
||||
}
|
||||
if (ELEM(node.type, GEO_NODE_SIMULATION_INPUT, GEO_NODE_SIMULATION_OUTPUT, GEO_NODE_BAKE)) {
|
||||
aal::RelationsInNode &relations = scope.construct<aal::RelationsInNode>();
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user