[Bf-blender-cvs] [79b3de9a63d] functions: assert data types when inserting links
Jacques Lucke
noreply at git.blender.org
Sun Feb 2 14:27:24 CET 2020
Commit: 79b3de9a63d236929f029c869dbdcf52b4795381
Author: Jacques Lucke
Date: Sun Feb 2 14:16:58 2020 +0100
Branches: functions
https://developer.blender.org/rB79b3de9a63d236929f029c869dbdcf52b4795381
assert data types when inserting links
===================================================================
M source/blender/functions/intern/multi_function_network.cc
===================================================================
diff --git a/source/blender/functions/intern/multi_function_network.cc b/source/blender/functions/intern/multi_function_network.cc
index 52e0d9689b7..fdf51afd062 100644
--- a/source/blender/functions/intern/multi_function_network.cc
+++ b/source/blender/functions/intern/multi_function_network.cc
@@ -172,6 +172,7 @@ void MFNetworkBuilder::add_link(MFBuilderOutputSocket &from, MFBuilderInputSocke
{
BLI_assert(to.origin() == nullptr);
BLI_assert(from.m_node->m_network == to.m_node->m_network);
+ BLI_assert(from.data_type() == to.data_type());
from.m_targets.append(&to);
to.m_origin = &from;
}
@@ -188,6 +189,7 @@ void MFNetworkBuilder::relink_origin(MFBuilderOutputSocket &new_from, MFBuilderI
{
BLI_assert(to.m_origin != nullptr);
BLI_assert(to.m_origin != &new_from);
+ BLI_assert(new_from.data_type() == to.data_type());
to.m_origin->m_targets.remove_first_occurrence_and_reorder(&to);
new_from.m_targets.append(&to);
to.m_origin = &new_from;
More information about the Bf-blender-cvs
mailing list