TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ SaveDownloadsDatabase()

void TextureStore::SaveDownloadsDatabase ( )

Definition at line 236 of file TextureStore.cpp.

237{
238 nlohmann::json tmp2;
239
240 for(int id : downloadedTextureStoreItems)
241 {
242 nlohmann::json tmp;
243 tmp["abledo"] = textureStoreItems[id].abledo;
244 tmp["normal"] = textureStoreItems[id].normal;
245 tmp["roughness"]= textureStoreItems[id].roughness;
246 tmp["metallic"] = textureStoreItems[id].metallic;
247 tmp["ao"] = textureStoreItems[id].ao;
248 tmp["arm"] = textureStoreItems[id].arm;
249 tmp["baseDir"] = textureStoreItems[id].baseDir;
250 tmp2[textureStoreItems[id].name] = tmp;
251 }
252
253 SaveToFile(GetExecutableDir() + PATH_SEPARATOR "Data" PATH_SEPARATOR
254 "configs" PATH_SEPARATOR "texture_database_downloaded.terr3d",
255 tmp2.dump(4));
256}
string_t dump(const int indent=-1, const char indent_char=' ', const bool ensure_ascii=false, const error_handler_t error_handler=error_handler_t::strict) const
serialization
Definition: json.hpp:20117
a class to store JSON values
Definition: json.hpp:17860