diff options
Diffstat (limited to 'rotord')
| -rw-r--r-- | rotord/src/graph.cpp | 5 | ||||
| -rw-r--r-- | rotord/src/nodes_source.h | 1 | ||||
| -rw-r--r-- | rotord/src/rotor.h | 10 |
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: |
