private void ExportVisualMesh(View.VisualMeshExportWindow exportWindow, string modelFilename) { List <string> superBMDArgs = new List <string>(new string[] { "-i", $"{ modelFilename }", "-o", $"{ exportWindow.FileName }", }); SuperBMDLib.Arguments args = new SuperBMDLib.Arguments(superBMDArgs.ToArray()); SuperBMDLib.Model newJ3D = SuperBMDLib.Model.Load(args); newJ3D.ExportAssImp(exportWindow.FileName, "dae", new SuperBMDLib.ExportSettings()); // TODO: the daes exported by this have issues that prevents them from being read properly by blender }
private string ImportVisualMesh(View.VisualMeshImportWindow importWindow, bool isBDL) { string tempFileName = Path.GetFileNameWithoutExtension(Path.GetTempFileName()); string loadFilename = Path.Combine(Path.GetTempPath(), "Winditor", tempFileName + (isBDL ? ".bdl" : ".bmd")); List <string> superBMDArgs = new List <string>(new string[] { "-i", $"{ importWindow.FileName }" }); superBMDArgs.Add("--rotate"); if (isBDL) { superBMDArgs.Add("-b"); } if (importWindow.GenerateMaterials) { superBMDArgs.Add("-glm"); } SuperBMDLib.Arguments args = new SuperBMDLib.Arguments(superBMDArgs.ToArray()); SuperBMDLib.Model newJ3D = SuperBMDLib.Model.Load(args); newJ3D.ExportBMD(loadFilename, isBDL); return(loadFilename); }