248{
249 if (path.size() <= 3)
250 {
251 return;
252 }
253
254 if (path.find(".terr3d") == std::string::npos)
255 {
256 path = path + ".terr3d";
257 }
258
259 bool flagRd = true;
260 std::string sdata = ReadShaderSourceFile(path, &flagRd);
261
262 if (!flagRd)
263 {
264 Log("Could not read file : " + path);
265 return;
266 }
267
268 if (sdata.size() == 0)
269 {
270 Log("Empty file.");
271 return;
272 }
273
275
276 try
277 {
279 }
280
281 catch (...)
282 {
283 Log("Failed to Parse file : " + path);
284 }
285
286 if (path != appState->globals.currentOpenFilePath)
287 {
288 appState->globals.currentOpenFilePath = path;
289 }
290
291 Deserialize(tmp);
292}
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json parse(InputType &&i, const parser_callback_t cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)
deserialize from a compatible input
a class to store JSON values