/// <summary> /// Open file dialog than load choosen model. /// </summary> public void Load() { var label = LeanLocalization.GetTranslation("Open").Text; var fileNames = StandaloneFileBrowser.OpenFilePanel(label, "", "aga", false); if (fileNames.Length > 0 && fileNames[0] != "") { Load(fileNames[0]); JointsUtils.RebuildJoints(); } }
/// <summary> /// Redo one operation if aviable /// </summary> public void Redo() { if (historyCursor + 1 < history.Count) { var nodes = history[++historyCursor]; for (var i = 0; i < nodes.Length; i++) { nodes[i].Redo(); } JointsUtils.RebuildJoints(); } }
/// <summary> /// Revert last operation. /// </summary> public void Undo() { if (historyCursor >= 0) { var nodes = history[historyCursor--]; for (var i = 0; i < nodes.Length; i++) { nodes[i].Undo(); } JointsUtils.RebuildJoints(); } }