[Bf-blender-cvs] [06401157a69] master: Fix: incorrect attribute type in network
Jacques Lucke
noreply at git.blender.org
Sat Jul 11 18:02:24 CEST 2020
Commit: 06401157a69f769388c533979b0558ac599d792e
Author: Jacques Lucke
Date: Sat Jul 11 17:59:43 2020 +0200
Branches: master
https://developer.blender.org/rB06401157a69f769388c533979b0558ac599d792e
Fix: incorrect attribute type in network
===================================================================
M source/blender/blenkernel/intern/simulation.cc
M source/blender/functions/intern/multi_function_network.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc
index 35ef664dce3..cce324d49ee 100644
--- a/source/blender/blenkernel/intern/simulation.cc
+++ b/source/blender/blenkernel/intern/simulation.cc
@@ -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());
}
diff --git a/source/blender/functions/intern/multi_function_network.cc b/source/blender/functions/intern/multi_function_network.cc
index 47e3bf4d0b5..11c9c065f51 100644
--- a/source/blender/functions/intern/multi_function_network.cc
+++ b/source/blender/functions/intern/multi_function_network.cc
@@ -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;
}
More information about the Bf-blender-cvs
mailing list