protected override TreeViewItem BuildRoot() { var root = new GraphCollectionTreeItem(); var collections = BatchBuildConfig.GetConfig().GraphCollections; foreach (var c in collections) { root.AddChild(new GraphCollectionTreeItem(c)); } return(root); }
protected override void RenameEnded(RenameEndedArgs args) { base.RenameEnded(args); if (args.newName.Length > 0 && args.newName != args.originalName) { GraphCollectionTreeItem renamedItem = FindItem(args.itemID, rootItem) as GraphCollectionTreeItem; args.acceptedRename = renamedItem.TryRename(args.newName); ReloadAndSelect(); } else { args.acceptedRename = false; } }
public DragAndDropData(DragAndDropArgs a) { args = a; graphGuids = null; draggedNode = DragAndDrop.GetGenericData("GraphCollectionTree.DraggedItem") as GraphCollectionTreeItem; targetNode = args.parentItem as GraphCollectionTreeItem; detailDraggedNodes = DragAndDrop.GetGenericData("GraphCollectionDetailTree.DraggedItems") as List <GraphCollectionDetailTreeItem>; foreach (var path in DragAndDrop.paths) { if (TypeUtility.GetMainAssetTypeAtPath(path) == typeof(Model.ConfigGraph)) { if (graphGuids == null) { graphGuids = new List <string>(); } graphGuids.Add(AssetDatabase.AssetPathToGUID(path)); } } }