| 533 | } |
| 534 | |
| 535 | void EffectChain::LoadBasics(const ofxJSONElement& moduleInfo, std::string typeName) |
| 536 | { |
| 537 | IDrawableModule::LoadBasics(moduleInfo, typeName); |
| 538 | |
| 539 | const ofxJSONElement& effects = moduleInfo["effects"]; |
| 540 | |
| 541 | for (int i = 0; i < effects.size(); ++i) |
| 542 | { |
| 543 | try |
| 544 | { |
| 545 | std::string type = effects[i]["type"].asString(); |
| 546 | std::string name; |
| 547 | if (effects[i]["name"].isNull()) //old version before name was saved |
| 548 | name = type; |
| 549 | else |
| 550 | name = effects[i]["name"].asString(); |
| 551 | AddEffect(type, name, !K(onTheFly)); |
| 552 | } |
| 553 | catch (Json::LogicError& e) |
| 554 | { |
| 555 | TheSynth->LogEvent(__PRETTY_FUNCTION__ + std::string(" json error: ") + e.what(), kLogEventType_Error); |
| 556 | } |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | void EffectChain::LoadLayout(const ofxJSONElement& moduleInfo) |
| 561 | { |
no test coverage detected