private void DeleteSelection() { List <string> list = this.CollectSelectionNames(); if (list.Count == 0) { return; } if (GraphGUI.DeleteNodeDialog(list.ToArray())) { this.blendTreeGraph.RemoveNodeMotions(this.selection); this.blendTreeGraph.BuildFromBlendTree(this.blendTreeGraph.rootBlendTree); } this.ClearSelection(); this.UpdateUnitySelection(); }
private void DeleteNodeCallback(object obj) { Node node = obj as Node; if (!node) { return; } string[] toDelete = new string[] { node.motion.name }; if (GraphGUI.DeleteNodeDialog(toDelete)) { this.blendTreeGraph.RemoveNodeMotions(new Node[] { node }); this.blendTreeGraph.BuildFromBlendTree(this.blendTreeGraph.rootBlendTree); } }