Fix: incorrect attribute type in network

This commit is contained in:
Jacques Lucke 2020-07-11 17:59:43 +02:00
parent 46b79b3d4a
commit 06401157a6
2 changed files with 2 additions and 1 deletions

View File

@ -247,7 +247,7 @@ static AttributeNodeMap deduplicate_attribute_nodes(fn::MFNetwork &network,
attribute_nodes_by_name_and_type;
for (uint i : IndexRange(amount)) {
attribute_nodes_by_name_and_type
.lookup_or_add_default({attribute_names[i], name_sockets[i]->data_type()})
.lookup_or_add_default({attribute_names[i], name_sockets[i]->node().output(0).data_type()})
.append(&name_sockets[i]->node());
}

View File

@ -197,6 +197,7 @@ MFInputSocket &MFNetwork::add_output(StringRef name, MFDataType data_type)
void MFNetwork::relink(MFOutputSocket &old_output, MFOutputSocket &new_output)
{
BLI_assert(&old_output != &new_output);
BLI_assert(old_output.data_type_ == new_output.data_type_);
for (MFInputSocket *input : old_output.targets()) {
input->origin_ = &new_output;
}