nodeview can connect and disconnect nodes

This commit is contained in:
itsmattkc
2019-07-16 04:43:57 -04:00
parent 9d2fc71efc
commit 1a39216be2
10 changed files with 251 additions and 49 deletions
+3 -1
View File
@@ -87,7 +87,7 @@ bool NodeParam::AreDataTypesCompatible(const DataType &output_type, const QList<
return false;
}
void NodeParam::ConnectEdge(NodeOutput *output, NodeInput *input)
NodeEdgePtr NodeParam::ConnectEdge(NodeOutput *output, NodeInput *input)
{
// If the input can only accept one input (the default) and has one already, disconnect it
if (!input->edges_.isEmpty() && !input->can_accept_multiple_inputs()) {
@@ -98,6 +98,8 @@ void NodeParam::ConnectEdge(NodeOutput *output, NodeInput *input)
output->edges_.append(edge);
input->edges_.append(edge);
return edge;
}
void NodeParam::DisconnectEdge(NodeEdgePtr edge)