| 2511 | } |
| 2512 | |
| 2513 | bool ModularSynth::LoadLayoutFromString(std::string jsonString) |
| 2514 | { |
| 2515 | ofxJSONElement root; |
| 2516 | bool loaded = root.parse(jsonString); |
| 2517 | |
| 2518 | if (!loaded) |
| 2519 | { |
| 2520 | LogEvent("Couldn't load, error parsing json string", kLogEventType_Error); |
| 2521 | ofLog() << jsonString; |
| 2522 | return false; |
| 2523 | } |
| 2524 | |
| 2525 | LoadLayout(root); |
| 2526 | return true; |
| 2527 | } |
| 2528 | |
| 2529 | void ModularSynth::LoadLayout(ofxJSONElement json) |
| 2530 | { |