summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-11-28 23:54:24 +0000
committerComment <tim@gray.(none)>2013-11-28 23:54:24 +0000
commit7962d0493767a30895898cf40585ca042bbf08c0 (patch)
treea2270e77050e7c08bba48cab6cf90c69585dad1c
parent09a65304f32ca7b86e7710d689600f5c7afce578 (diff)
fixed signal colour
-rw-r--r--rotord/src/graph.cpp5
-rw-r--r--rotord/src/nodes_source.h1
-rw-r--r--rotord/src/rotor.h10
3 files changed, 11 insertions, 5 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index e9972f3..4039d4b 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -328,6 +328,11 @@ bool Graph::parseJson(string &data,string &media_path){
settings["type"]=jnodes[i]["type"].asString();
//attributes
settings["media_path"]=media_path;
+ for (uint32_t m=0;m<jnodes[i]["attributes"].size();m++) {
+ if (jnodes[i]["attributes"][m]["type"].asString()!="array") {
+ settings[jnodes[i]["attributes"][m]["name"].asString()]=jnodes[i]["attributes"][m]["value"].asString();
+ }
+ }
Node* node=factory.create(settings);
for (uint32_t m=0;m<jnodes[i]["attributes"].size();m++){
string attribute=jnodes[i]["attributes"][m]["name"].asString();
diff --git a/rotord/src/nodes_source.h b/rotord/src/nodes_source.h
index 7a699e3..3b30f1b 100644
--- a/rotord/src/nodes_source.h
+++ b/rotord/src/nodes_source.h
@@ -24,6 +24,7 @@ namespace Rotor {
Image *output(const Frame_spec &frame){
if (palette.size()) {
int col=((int)inputs[0]->get((Time_spec)frame))%palette.size();
+ if (col!=prevcol) cerr<<"colour now "<<palette[col].r<<","<<palette[col].g<<","<<palette[col].b<<endl;
//if (col!=prevcol){ //how about when starting a new render?
for (int i=0;i<image.w*image.h;i++){
image.RGBdata[i*3]=palette[col].r;
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index 6a0996e..5e77704 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -823,11 +823,11 @@ namespace Rotor {
};
~Video_loader(){};
- void init_attribute(const string &attr){
- if (attr=="filename") {
- isLoaded=load(media_path+attributes[attr]->value);
- }
- };
+ //void init_attribute(const string &attr){
+ // if (attr=="filename") {
+ // isLoaded=load(media_path+attributes[attr]->value);
+ // }
+ //};
Video_loader* clone(map<string,string> &_settings) { return new Video_loader(_settings);};
bool isLoaded;
private: