MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / LoadBasics

Method LoadBasics

Source/EffectChain.cpp:535–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535void 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
560void EffectChain::LoadLayout(const ofxJSONElement& moduleInfo)
561{

Callers 1

CreateModuleMethod · 0.45

Calls 2

sizeMethod · 0.80
LogEventMethod · 0.80

Tested by

no test coverage detected