public static void AddR3AnimatedMeshToLibrary(ExportableModel r3AnimatedMesh) { string exportObjectsLibraryPath = GetExportObjectsLibraryPath(); ObjectsExportLibraryModel exportObjectsLibrary = LoadObjectsExportLibraryOrCreateNewIfNotExists(exportObjectsLibraryPath); exportObjectsLibrary.AddR3AnimatedMesh(r3AnimatedMesh); SaveObjectsExportLibrary(exportObjectsLibrary, exportObjectsLibraryPath); }
private static void SaveObjectsExportLibrary(ObjectsExportLibraryModel exportObjectsLibrary, string objectsExportLibraryPath) { var settings = new JsonSerializerSettings { Formatting = Formatting.Indented }; var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(exportObjectsLibrary, settings); System.IO.File.WriteAllText(objectsExportLibraryPath, jsonString); }