use strings to connect nodes
This makes the node system somewhat more high-level with the intent of making working with them far more flexible and stable. By making the architecture more abstracted, it becomes far less rigid which should allow us to do even more with it and make it much less crash prone.
This commit is contained in:
@@ -29,13 +29,13 @@ namespace olive {
|
||||
void XMLConnectNodes(const XMLNodeData &xml_node_data, MultiUndoCommand *command)
|
||||
{
|
||||
foreach (const XMLNodeData::SerializedConnection& con, xml_node_data.desired_connections) {
|
||||
Node* out = xml_node_data.node_ptrs.value(con.output);
|
||||
NodeOutput out(xml_node_data.node_ptrs.value(con.output_node), con.output);
|
||||
|
||||
if (out) {
|
||||
if (out.IsValid()) {
|
||||
if (command) {
|
||||
command->add_child(new NodeEdgeAddCommand(out, con.input, con.element));
|
||||
command->add_child(new NodeEdgeAddCommand(out, con.input));
|
||||
} else {
|
||||
Node::ConnectEdge(out, con.input, con.element);
|
||||
Node::ConnectEdge(out, con.input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user