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.h41
1 files changed, 37 insertions, 4 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index 72f1ea4..ec9a193 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -193,6 +193,7 @@ namespace Rotor {
string description;
string type;
string ID;
+ string UID;
string title;
bool duplicate_inputs;
string find_setting(map<string,string> &settings,string key,string def=""){ if (settings.find(key)!=settings.end()) return settings[key]; else return def;};
@@ -294,6 +295,7 @@ namespace Rotor {
Time(){
title="Time";
description="Outputs the time in seconds as a signal";
+ UID="432b0d1e-2d09-11e3-a8b9-e3affcfd2b31";
};
Time(map<string,string> &settings): Time() {
base_settings(settings);
@@ -308,6 +310,7 @@ namespace Rotor {
Track_time(){
title="Track time";
description="Outputs the fraction of the track as a signal";
+ UID="5892933e-2d09-11e3-8f2e-47c1defdb1d7";
};
Track_time(map<string,string> &settings): Track_time() {
base_settings(settings);
@@ -324,6 +327,7 @@ namespace Rotor {
create_parameter("time","number","Track time to evaluate","Time",0.0f);
title="@Track time";
description="Gets input from a different point in the track";
+ UID="6a3edb9c-2d09-11e3-975c-df9df6d19f0a";
};
At_track_time(map<string,string> &settings): At_track_time() {
base_settings(settings);
@@ -340,6 +344,7 @@ namespace Rotor {
create_signal_input("signal","Signal Input");
title="Signal output";
description="Outputs a signal to xml for testing";
+ UID="74773190-2d09-11e3-ae26-7f2bb9af632c";
};
Signal_output(map<string,string> &settings): Signal_output() {
base_settings(settings);
@@ -383,6 +388,7 @@ namespace Rotor {
create_parameter("invert","number","Invert when greater than 0.0","Negative",1.0f,0.0f,1.0f);
title="Negative";
description="Inverts the input picture";
+ UID="8676c25c-2d09-11e3-80a7-db36c774523c";
};
Invert(map<string,string> &settings) :Invert() {
base_settings(settings);
@@ -411,7 +417,21 @@ namespace Rotor {
#define CYCLER_stretch 3
//new mode that remaps sequence length to segments
//combined with a video mode that maps video length to duration
- //or
+ //time remapper object
+ //takes a signal and turns it into a new timeline
+ //
+ //to make a movie stretch to a segment..
+ //modulus a segmenter into the position controller of a video player
+ //
+ //how else?
+ //q: how to create a relative timeline from a segment?
+ //a: you need the begiining and end points to calculate the duration
+ //
+ //q: where do we have this info/ where do we get it?
+ //a: only in the node that generated it?
+ //
+ //q: what would it take to get this info from place to place
+ //a: would need to send featuresets down the line with
class Video_cycler: public Image_node {
public:
Video_cycler(){
@@ -422,6 +442,7 @@ namespace Rotor {
title="Video cycler";
description="Cycles through video inputs according to selector signal";
duplicate_inputs=true;
+ UID="93dd9d76-2d09-11e3-9589-5bbbeea1b304";
}
Video_cycler(map<string,string> &settings):Video_cycler() {
base_settings(settings);
@@ -431,10 +452,8 @@ namespace Rotor {
Image *output(const Frame_spec &frame){
Frame_spec inframe=frame;
switch (attributes["time_mode"]->intVal){
- case CYCLER_abs:
- inframe=frame;
- break;
case CYCLER_rel:
+
break;
case CYCLER_stretch:
break;
@@ -475,6 +494,7 @@ namespace Rotor {
create_attribute("palette","palette list of web colours","Colour palette","000000");
title="Signal colour";
description="Cycles through a palette of background colours according to selector signal";
+ UID="a2183fe0-2d09-11e3-9a64-538ee2cf40bc";
};
Signal_colour(map<string,string> &settings):Signal_colour() {
base_settings(settings);
@@ -511,6 +531,7 @@ namespace Rotor {
create_signal_input("Signal","Signal input");
title="Signal greyscale";
description="Renders signal level as greyscale background";
+ UID="ae91b8a0-2d09-11e3-aa7d-8b7f1ef1a439";
};
Signal_greyscale(map<string,string> &settings):Signal_greyscale() {
base_settings(settings);
@@ -545,6 +566,7 @@ namespace Rotor {
create_attribute("operator","operator for image","Operator","+",{"+","-","*","/"});
title="Image arithmetic";
description="Performs arithmetic on an image with a signal or value";
+ UID="bc3b633e-2d09-11e3-86b2-7fbba3d71604";
};
Image_arithmetic(map<string,string> &settings):Image_arithmetic() {
base_settings(settings);
@@ -592,6 +614,7 @@ namespace Rotor {
create_attribute("mode","Blend mode","Blend mode","blend",{"blend","screen","multiply","alpha","wrap","xor"});
title ="Blend";
description="Blend images in various modes";
+ UID="12ed7af0-2d0a-11e3-ae32-2b44203b93c9";
};
Blend(map<string,string> &settings):Blend() {
base_settings(settings);
@@ -655,6 +678,7 @@ namespace Rotor {
create_attribute("mode","Mirror mode","Mirror mode","horiz",{"horiz","vert","horizR","vertR"});
title="Mirror";
description="Mirror video across a central axis";
+ UID="1fed5b26-2d0a-11e3-9901-4b5ea78a005d";
};
Mirror(map<string,string> &settings):Mirror() {
base_settings(settings);
@@ -717,6 +741,7 @@ namespace Rotor {
create_image_input("image input","Image input");
title="Monochrome";
description="Render video greyscale";
+ UID="2c3cb12e-2d0a-11e3-a46b-a34e44493cef";
};
Monochrome(map<string,string> &settings):Monochrome() {
base_settings(settings);
@@ -747,6 +772,7 @@ namespace Rotor {
create_image_input("alpha input","Alpha input");
title="Alpha merge";
description="Alpha merge two images";
+ UID="3f5e3eee-2d0a-11e3-8679-1374154a9fa8";
};
Alpha_merge(map<string,string> &settings):Alpha_merge() {
base_settings(settings);
@@ -785,6 +811,7 @@ namespace Rotor {
title="Difference matte";
description="Create an alpha channel using a background reference picture";
LUT=nullptr;
+ UID="4db4d2c8-2d0a-11e3-b08b-7fb00f8c562a";
};
Difference_matte(map<string,string> &settings):Difference_matte() {
base_settings(settings);
@@ -910,6 +937,7 @@ namespace Rotor {
create_attribute("time_mode","time mode","Time mode","play",{"play","stretch"});
title="Video loader";
description="Loads a video file";
+ UID="5b64b8ca-2d0a-11e3-92ed-4b7420b40040";
};
Video_loader(map<string,string> &settings): Video_loader() {
base_settings(settings);
@@ -1014,6 +1042,7 @@ namespace Rotor {
description="Output to video";
start_silence=start_peak=end_silence=end_peak=-1.0f;
silence_threshold=0.01f;
+ UID="693d2220-2d0a-11e3-9312-232908c3cc33";
};
Video_output(map<string,string> &settings):Video_output() {
base_settings(settings);
@@ -1085,6 +1114,7 @@ namespace Rotor {
title="Video feedback";
description="Repeats output of the last frame";
feedback=nullptr;
+ UID="78edfa28-2d0a-11e3-86c7-9f266fabb10c";
};
Video_feedback(map<string,string> &settings):Video_feedback() {
base_settings(settings);
@@ -1143,6 +1173,7 @@ namespace Rotor {
XML.addAttribute("node","inputs",type->duplicate_inputs?"expandable":"fixed",i);
XML.addAttribute("node","title",type->title,i);
XML.addAttribute("node","description",type->description,i);
+ XML.addAttribute("node","UID",type->UID,i);
if (dynamic_cast<Signal_node*> (type)!=nullptr) XML.addAttribute("node","output","signal",i);
if (dynamic_cast<Image_node*> (type)!=nullptr) XML.addAttribute("node","output","image",i);
XML.pushTag("node",i);
@@ -1239,6 +1270,7 @@ namespace Rotor {
if (dynamic_cast<Signal_node*> (_node)!=nullptr) node["output"]="signal";
if (dynamic_cast<Image_node*> (_node)!=nullptr) node["output"]="image";
node["description"]=_node->description;
+ node["UID"]=_node->UID;
if (_node->inputs.size()){
node["signal_inputs"]=Json::arrayValue;
for (auto& input: _node->inputs) {
@@ -1308,6 +1340,7 @@ namespace Rotor {
if (dynamic_cast<Signal_node*> (type.second)!=nullptr) node["output"]="signal";
if (dynamic_cast<Image_node*> (type.second)!=nullptr) node["output"]="image";
node["description"]=type.second->description;
+ node["UID"]=type.second->UID;
if (type.second->inputs.size()){
node["signal_inputs"]=Json::arrayValue;
for (auto& input: type.second->inputs) {