private void CreateOutput(GraphViewConnector nodeConnector) { Data.RefreshConnections(); Output = new GraphViewOutputPort(this, Data.Connections[0], nodeConnector, null); Output.AddToClassList(StartOutputUssClassName); titleButtonContainer.Add(Output); RefreshPorts(); }
private void SetupConnection(GraphViewOutputPort output) { _inputs.ForEach(input => { if (output.Connection.To == input.Node.Data.Node) { output.Connection.SetTarget(input.Node.Data); var edge = new Edge { output = output, input = input }; AddEdge(edge); } }); }
protected void CreateOutputs(List <GraphViewOutputPort> outputs, GraphViewConnector nodeConnector, SerializedProperty renameableProperty) { Data.RefreshConnections(); outputs.Clear(); renameableProperty?.serializedObject.Update(); renameableProperty = null; // TODO - figure out a better way to name connections and the like for (var i = 0; i < Data.Connections.Count; i++) { var connection = Data.Connections[i]; var nameProperty = renameableProperty?.GetArrayElementAtIndex(i); var output = new GraphViewOutputPort(this, connection, nodeConnector, nameProperty) { portName = connection.Name }; outputContainer.Add(output); outputs.Add(output); } expanded = Data.Connections.Count > 0; RefreshPorts(); }