Exemplo n.º 1
0
        public static void AddR3AnimatedMeshToLibrary(ExportableModel r3AnimatedMesh)
        {
            string exportObjectsLibraryPath = GetExportObjectsLibraryPath();

            ObjectsExportLibraryModel exportObjectsLibrary = LoadObjectsExportLibraryOrCreateNewIfNotExists(exportObjectsLibraryPath);

            exportObjectsLibrary.AddR3AnimatedMesh(r3AnimatedMesh);
            SaveObjectsExportLibrary(exportObjectsLibrary, exportObjectsLibraryPath);
        }
Exemplo n.º 2
0
        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);
        }