/// <summary> /// 移除输出节点 /// </summary> /// <param name="uIdx"></param> private void RemoveOutputNode(string uIdx) { //移除输出节点 var outputNode = this.selfNodeGUI.Data.OutputPoints.Find((node) => node.Id == uIdx); //移除数据 var gp = this.groupFilterPathDataList.Find((g) => g.OutputNodeId.Equals(uIdx)); this.groupFilterPathDataList.Remove(gp); //移除连接线 GraphNodeHelper.RemoveOutputNode(this.selfNodeGUI, outputNode); GraphNodeHelper.UpdateConnectLine(this.selfNodeGUI, outputNode); }
private void RemoveFromFilterEntryList(ReorderableList list) { if (list.count > 2) { //移除序列化值 var removeIdx = this.groupFilterPathDataList.Count - 1; var rItem = this.groupFilterPathDataList[removeIdx]; this.groupFilterPathDataList.RemoveAt(removeIdx); //移除输出节点 var rOutputNode = this.selfNodeGUI.Data.OutputPoints.Find((node) => node.Id == rItem.OutputNodeId); this.selfNodeGUI.Data.OutputPoints.Remove(rOutputNode); list.index--; //刷新 GraphNodeHelper.RemoveOutputNode(this.selfNodeGUI, rOutputNode); GraphNodeHelper.UpdateNodeGraph(this.selfNodeGUI); } }