summaryrefslogtreecommitdiff
path: root/rotord/src/rotor.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/rotor.h')
-rw-r--r--rotord/src/rotor.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index fcee9d9..94ec643 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -206,7 +206,7 @@ namespace Rotor {
class Attribute{ //description of a static attribute which can be an enumerated string array
public:
virtual ~Attribute(){};
- Attribute(const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}): description(_desc),title(_title),value(_value),intVal(0){
+ Attribute(const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string"): description(_desc),title(_title),value(_value),intVal(0),type(_type){
vals=_vals;
init(_value);
};
@@ -218,7 +218,7 @@ namespace Rotor {
}
else intVal=0;
}
- string value,description,title;
+ string value,description,title,type;
std::vector<std::string> vals;
int intVal;
};
@@ -240,18 +240,15 @@ namespace Rotor {
void create_parameter(const string &_name,const string &_type,const string &_desc,const string &_title,float _value=1.0f,float _min=0.0f,float _max=0.0f,float _step=0.0f,Node* _connect=nullptr) {
parameters[_name]=new Parameter(_type,_desc,_title,_value,_min,_max,_step,_connect);
};
- void create_attribute(const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) {
- attributes[_attr]=new Attribute(_desc,_title,_value,_vals);
+ void create_attribute(const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") {
+ attributes[_attr]=new Attribute(_desc,_title,_value,_vals,_type);
};
- //void create_attribute(const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) {
- // attributes[_attr]=new Attribute(_desc,_title,_value,_vals);
- //};
- void create_attribute(string *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) {
- create_attribute(_attr,_desc,_title,_value,_vals);
+ void create_attribute(string *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") {
+ create_attribute(_attr,_desc,_title,_value,_vals,_type);
alias=&(attributes[_attr]->value);
};
- void create_attribute(int *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) {
- create_attribute(_attr,_desc,_title,_value,_vals);
+ void create_attribute(int *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") {
+ create_attribute(_attr,_desc,_title,_value,_vals,_type);
alias=&(attributes[_attr]->intVal);
};
virtual void init_attribute(const string &attr){};
@@ -571,14 +568,21 @@ namespace Rotor {
Image in1,in2,in2t,temp; //for blend frames;
string *filename;
};
- class Video_bank: public Video_loader {
+ class Video_bank: public Image_node {
public:
Video_bank(){
+ create_attribute("filenames","names of video files to load","File names","",{},"array");
UID="73616e66-4306-11e3-981e-74d02b29f6a6";
+ title="Video bank";
+ description="Loads a banks of video files";
};
Video_bank(map<string,string> &settings): Video_bank() {
base_settings(settings);
};
+ Image *output(const Frame_spec &frame){
+ return nullptr;
+ }
+ Video_bank* clone(map<string,string> &_settings) { return new Video_bank(_settings);};
~Video_bank(){};
private:
};