summaryrefslogtreecommitdiff
path: root/rotord/src/graph.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-08-27 13:19:21 +0100
committerTim Redfern <tim@eclectronics.org>2013-08-27 13:19:21 +0100
commitc85e9dfbeeb447332545d40ac52c07630fbb9121 (patch)
tree7afd810a3f151f8cc3b4224e4dcb3a52c899bba5 /rotord/src/graph.cpp
parent150c9823e71a161e97003849cf8b2f55b21520bd (diff)
audio thumbnail vector data
Diffstat (limited to 'rotord/src/graph.cpp')
-rw-r--r--rotord/src/graph.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index 5871b7b..162232f 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -187,7 +187,15 @@ bool Graph::parseJson(string &data,string &media_path){
else cerr << "Rotor: cannot find parameter '" << parameter << "' of "<<settings["type"]<<" "<< nodeID << endl;
}
- //
+ //attributes
+ for (int m=0;m<jnodes[i]["attributes"].size();m++){
+ string attribute=jnodes[i]["attributes"][m]["name"].asString();
+ if (nodes[nodeID]->attributes.find(attribute)!=nodes[nodeID]->attributes.end()) {
+ string val=jnodes[i]["attributes"][m]["value"].asString();
+ nodes[nodeID]->attributes.find(attribute)->second->value=val;
+ }
+ else cerr << "Rotor: cannot find attribute '" << attribute << "' of "<<settings["type"]<<" "<< nodeID << endl;
+ }
}
else cerr << "Rotor: duplicate node '"<<nodeID<<"' "<< endl;