public chkBoxData(string t, string n, Templates.SplitEntry split = null, Templates.SplitEntryMDL mdl = null) { type = t; dispName = n; if (split != null) { splitEntry = split; dispName += " (" + split.SourceFile + ")"; } if (mdl != null) { mdlEntry = mdl; dispName += " (" + mdl.ModelFile + ")"; } }
private void splitMdlFiles(Templates.SplitEntryMDL splitMDL, SonicRetro.SAModel.SAEditorCommon.UI.ProgressDialog progress, string gameFolder, string outputFolder) { string filePath = Path.Combine(gameFolder, splitMDL.ModelFile); string fileOutputFolder = Path.Combine(outputFolder, "figure\\bin"); progress.StepProgress(); progress.SetStep("Splitting models from " + splitMDL.ModelFile); #region Validating Inputs if (!File.Exists(filePath)) { MessageBox.Show((filePath + " is missing.\n\nPress OK to abort."), "Split Failed", MessageBoxButtons.OK, MessageBoxIcon.Warning); throw new Exception(SplitERRORVALUE.NoSourceFile.ToString()); //return (int)ERRORVALUE.NoSourceFile; } #endregion sa2MDL.Split(splitMDL.BigEndian, filePath, fileOutputFolder, splitMDL.MotionFiles.ToArray()); }