Switch

From RMIT Visual Effects
Jump to: navigation, search

Switch is a cute little node that, by default, accepts two inputs: 0 and 1 (some merge nodes have an A and B feed, some have a 1 and 0 feed... go figure). By changing its parameter value from 0 to 1, it will output either of these feeds. The same thing can be achieved with other nodes, but this is easier and requires fewer keyframes. By increasing the amount of feeds and changing the number input a simple time line edit can be effected. This is useful for previewing the effects of a compound timeline edit. Here:

Press 'Expand' and select and copy everything below this line, then paste into the Nuke node graph.

set cut_paste_input [stack 0]
version 9.0 v7
Constant {
 inputs 0
 channels rgb
 color {0.9583275914 0.6666666865 1 1}
 name Constant1
 selected true
 xpos -1096
 ypos -33
}
Constant {
 inputs 0
 channels rgb
 color {0.1250019073 1 0 1}
 name Constant2
 selected true
 xpos -1213
 ypos -34
}
Constant {
 inputs 0
 channels rgb
 color {0.416662842 0.3333333433 1 1}
 name Constant3
 selected true
 xpos -1330
 ypos -36
}
Constant {
 inputs 0
 channels rgb
 color {1 0.375005722 0 1}
 name Constant4
 selected true
 xpos -1483
 ypos -34
}
Switch {
 inputs 4
 which {{curve x1 0 x6.809329987 1 x12.73721695 2 x18.6651001 3}}
 name Switch1
 selected true
 xpos -1274
 ypos 205
}
TimeClip {
 time ""
 last 20
 after loop
 origset true
 name TimeClip1
 selected true
 xpos -1274
 ypos 229
}
Write {
 name Write1
 selected true
 xpos -1274
 ypos 303
}
Viewer {
 frame 68
 frame_range 1-100
 name Viewer1
 selected true
 xpos -1274
 ypos 359
}
StickyNote {
 inputs 0
 name StickyNote1
 label "Animated! "
 note_font_size 30
 selected true
 xpos -1329
 ypos -130
}
StickyNote {
 inputs 0
 name StickyNote2
 label " A simple Switch node in operation. \nSee its animation in the Curve Editor.\nThough it's curve is gradual, it only \nrecognises integers (i.e. whole numbers)...\ntherefore no fading. "
 selected true
 xpos -1143
 ypos 209
}