/// <summary> /// /// </summary> public void CloseFile() { IconJOBJManager.CleanupRendering(); StageNameJOBJManager.CleanupRendering(); StageMenuFile = null; /*if (Icons != null) * foreach (var v in Icons) * { * v.Joint = null; * v.Animation = null; * v.NameTOBJ = null; * v.IconTOBJ = null; * }*/ Enabled = false; }
/// <summary> /// /// </summary> /// <param name="offset"></param> /// <param name="size"></param> private void LoadAnimation(string symbol) { // clear animation JointManager.SetFigaTree(null); // check if animation exists if (symbol == null || !SymbolToAnimation.ContainsKey(symbol)) { return; } // load animation var anim = new HSDRawFile(SymbolToAnimation[symbol]); if (anim.Roots[0].Data is HSD_FigaTree tree) { var name = new Action() { Symbol = anim.Roots[0].Name }.ToString(); JointManager.SetFigaTree(tree); _animEditor.SetJoint(JointManager.GetJOBJ(0), JointManager.Animation); viewport.MaxFrame = tree.FrameCount; ThrowDummyManager.CleanupRendering(); ThrowDummyManager = new JOBJManager(); //AnimationName = name; // load throw dummy for thrown animations if (name.Contains("Throw") && !name.Contains("Taro")) { // find thrown anim Action throwAction = null; foreach (Action a in actionList.Items) { if (a.Symbol != null && a.Symbol.Contains("Taro") && a.Symbol.Contains(name) && !a.Symbol.Equals(anim.Roots[0].Name)) { throwAction = a; break; } } if (throwAction != null && throwAction.Symbol != null && SymbolToAnimation.ContainsKey(throwAction.Symbol)) { // load throw dummy ThrowDummyManager.SetJOBJ(DummyThrowModel.GenerateThrowDummy()); // load throw animation var tanim = new HSDRawFile(SymbolToAnimation[throwAction.Symbol]); if (tanim.Roots[0].Data is HSD_FigaTree tree2) { ThrowDummyManager.SetFigaTree(tree2); } } } } }