-
Notifications
You must be signed in to change notification settings - Fork 0
/
cm_switcher.nk
29 lines (29 loc) · 1.79 KB
/
cm_switcher.nk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Group {
inputs 0
name Switcher
tile_color 0x34eb6e00
label On
selected true
xpos 336
ypos -501
addUserKnob {20 controls l Controls}
addUserKnob {26 text l "" +STARTLINE T "Pick State:"}
addUserKnob {26 text_1 l "" +STARTLINE}
addUserKnob {22 offBtn l Off T "\n\ndef hex_color_to_int(hexValue):\n return int(hexValue+'00', 16)\n\n\nn = nuke.thisNode()\nk = n\['label']\nc = n\['tile_color']\nk.setValue(\"Off\")\nc.setValue(hex_color_to_int(\"eb4034\"))\n\n\n\nwith nuke.root():\n for i in nuke.allNodes():\n if i\['name'].value().startswith('cm_Switch'):\n i.knob('which').setValue(0)\n\n" +STARTLINE}
addUserKnob {22 onBtn l On -STARTLINE T "def hex_color_to_int(hexValue):\n return int(hexValue+'00', 16)\n\n\nn = nuke.thisNode()\nk = n\['label']\nc = n\['tile_color']\nk.setValue(\"On\")\nc.setValue(hex_color_to_int(\"34eb6e\"))\n\n\nwith nuke.root():\n for i in nuke.allNodes():\n if i\['name'].value().startswith('cm_Switch'):\n i.knob('which').setValue(1)"}
addUserKnob {22 otherBtn l Other -STARTLINE T "def hex_color_to_int(hexValue):\n return int(hexValue+'00', 16)\n\n\nn = nuke.thisNode()\nk = n\['label']\nc = n\['tile_color']\nk.setValue(\"Alt\")\nc.setValue(hex_color_to_int(\"3464eb\"))\n\n\ndef hex_color_to_int(hexValue):\n return int(hexValue+'00', 16)\n\n\nwith nuke.root():\n for i in nuke.allNodes():\n if i\['name'].value().startswith('cm_Switch'):\n i.knob('which').setValue(2)"}
addUserKnob {26 ""}
addUserKnob {26 me l "" +STARTLINE T "Switcher v1.0 - (c) 2022 - Chris McCrowe - <a href=\"www.chrismccrowe.com\" style=\"color:#69a1fa;\">www.chrismccrowe.com</a>"}
}
NoOp {
inputs 0
name NoOp1
xpos 825
ypos -579
}
Output {
name Output1
xpos 825
ypos -479
}
end_group