public static void Open(AssetList assets) { Task task = Provider.Status(assets); task.Wait(); WindowResolve.GetWindow().DoOpen(task.assetList); }
public static void Open(ChangeSet change) { Task task = Provider.ChangeSetStatus(change); task.Wait(); WindowResolve.GetWindow().DoOpen(task.assetList); }
// Resolve a list of files static public void Open(AssetList assets) { Task task = Provider.Status(assets); task.Wait(); WindowResolve win = GetWindow(); win.DoOpen(task.assetList, true); }
// Resolve all files within a change list static public void Open(ChangeSet change) { Task task = Provider.ChangeSetStatus(change); task.Wait(); WindowResolve win = GetWindow(); win.DoOpen(task.assetList, true); }
internal static void OnSubmitted(Task task) { var winsChange = Resources.FindObjectsOfTypeAll(typeof(WindowChange)) as WindowChange[]; if (winsChange.Length == 0) { return; // user closed submit window before submit finished. Just ignore the status callback. } var win = winsChange[0]; win.assetList = task.assetList; win.submitResultCode = task.resultCode; win.submitErrorMessage = null; if ((task.resultCode & (int)SubmitResult.Error) != 0) { string delim = ""; foreach (Message msg in task.messages) { if (msg.severity == Message.Severity.Error) { win.submitErrorMessage += delim + msg.message; } } } if ((task.resultCode & ((int)SubmitResult.OK | (int)SubmitResult.Error)) != 0) { WindowPending.UpdateAllWindows(); bool isNewChangeSet = win.changeSet == null; if (isNewChangeSet) { // When change list becomes empty we open it to make "delete empty changessets" button visible Task flushTask = Provider.Status(""); // Make a dummy task and wait for it since that will guarantee up to date lists flushTask.Wait(); WindowPending.ExpandLatestChangeSet(); } } if ((task.resultCode & (int)SubmitResult.OK) != 0) { win.ResetAndClose(); } else { WindowResolve.Open(win.assetList); win.ResetAndClose(); } }