summaryrefslogtreecommitdiff
path: root/rotord/src/graph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/graph.cpp')
-rw-r--r--rotord/src/graph.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index ebfcece..cc624a8 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -344,6 +344,15 @@ bool Graph::parseJson(string &data,string &media_path){
}
attr->init(vals);
}
+ if (attr->type=="lyrics"){
+ std::map<float,std::pair<string,float> > lyrics;
+ for (auto k:jnodes[i]["attributes"][m]["value"]){
+ if (k.size()>2&&k[0].isString()&&k[1].isNumeric()&&k[2].isNumeric()) {
+ lyrics[k[1].asFloat()]=std::make_pair(k[0].asString(),k[2].asFloat());
+ }
+ }
+ ((Lyrics_attribute*)attr)->init(lyrics);
+ }
node->init_attribute(attribute);
//cerr << "Rotor: setting attribute '"<<attribute<<"' of "<<nodeID<<" type "<<attr->type<<" to "<<val<<endl;
cerr << "Rotor: setting attribute '"<<attribute<<"' of "<<nodeID<<" type "<<attr->type<<" to "<<val<<endl;