summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-11-08 09:59:43 +0000
committerTim Redfern <tim@eclectronics.org>2013-11-08 09:59:43 +0000
commitab6e18cbb962c4ecc5a5099b1e3f1fff8d227ff6 (patch)
treec300719d25d01e2d0705e395105666643f1c3ebe
parent17b3ae2a27de4fe5d0f565efc83a38bd8ca81b26 (diff)
fix media path with json loader
-rw-r--r--rotord/src/graph.cpp4
-rw-r--r--rotord/src/rotor.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index 9544446..9622c04 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -333,7 +333,8 @@ bool Graph::parseJson(string &data,string &media_path){
}
if (attr->type=="string") {
val=jnodes[i]["attributes"][m]["value"].asString();
- attr->value=val;
+ //attr->value=val;
+ attr->init(val);
}
if (attr->type=="array"){
std::vector<std::string> vals;
@@ -344,6 +345,7 @@ bool Graph::parseJson(string &data,string &media_path){
}
attr->init(vals);
}
+ 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;
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index ee58484..b0d10c6 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -560,6 +560,7 @@ namespace Rotor {
Video_loader(){
create_attribute("filename","name of video file to load","File name","");
create_attribute("media_id","media_id","media_id","media_id"); //for rotorW
+ create_attribute("media_path","media_path","media_path","media_path"); //for rotorW
title="Video loader";
description="Loads a video file";
UID="5b64b8ca-2d0a-11e3-92ed-4b7420b40040";