SyntaxHighlighter

2013年7月11日木曜日

outRangeHandler

set cut_paste_input [stack 0]
version 7.0 v5
StickyNote {
 inputs 0
 name StickyNote1
 label outRangeHandler
 note_font "Helvetica Bold Bold Bold Bold Bold Bold Bold Bold Bold"
 note_font_size 12
 note_font_color 0xff
 selected true
 xpos -29
 ypos -248
 addUserKnob {20 User l outRangeHandler}
 addUserKnob {1 list}
 addUserKnob {26 line l "" +STARTLINE}
 addUserKnob {22 addAllToList l "add all to list" T "for n in nuke.allNodes():\n    n.setSelected(False)\nfor n in nuke.allNodes('Read'):\n    n.setSelected(True)\nlist = nuke.thisNode()\['list'].value()\nfor i in nuke.selectedNodes():\n    if i.name() in list:\n        pass\n    else:\n        list = list + i.name() + '\\n'\nnuke.thisNode()\['list'].setValue(list)\nfor n in nuke.allNodes('Read'):\n    n.setSelected(False)" +STARTLINE}
 addUserKnob {22 addToList l "add to list" T "list = nuke.thisNode()\['list'].value()\nfor i in nuke.selectedNodes():\n    if i.name() in list:\n        pass\n    else:\n        list = list + i.name() + '\\n'\nnuke.thisNode()\['list'].setValue(list)" +STARTLINE}
 addUserKnob {22 clearList l "clear list" -STARTLINE T "nuke.thisNode()\['list'].setValue('')"}
 addUserKnob {22 highlightList l "highlight list" -STARTLINE T "for n in nuke.allNodes():\n    if n.name() in nuke.thisNode()\['list'].value():\n        n.setSelected(True)\n    else:\n        n.setSelected(False)"}
 addUserKnob {22 changeNodeColor l "change node color" -STARTLINE T "for n in nuke.allNodes():\n    if n.name() in nuke.thisNode()\['list'].value():\n        n.setSelected(True)\n    else:\n        n.setSelected(False)        \nnukescripts.color_nodes()"}
 addUserKnob {6 beforeIO l before +STARTLINE}
 addUserKnob {4 choiceBeforeMethod l "" -STARTLINE M {hold loop bounce black "" "" "" ""}}
 choiceBeforeMethod black
 addUserKnob {6 afterIO l after -STARTLINE}
 addUserKnob {4 choiceAfterMethod l "" -STARTLINE M {hold loop bounce black ""}}
 choiceAfterMethod black
 addUserKnob {22 setOutRangeType l "set out range type" -STARTLINE T "befIO = nuke.thisNode()\['beforeIO'].value()\nprint befIO\n\nif befIO == True:\n\tbeforeMeth = nuke.thisNode()\['choiceBeforeMethod'].value()\n\tif beforeMeth == \"hold\":\n\t\tbeforeMeth = 0\n\t\tprint beforeMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['before'].setValue(beforeMeth)\n\telif beforeMeth == \"loop\":\n\t\tbeforeMeth = 1\n\t\tprint beforeMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['before'].setValue(beforeMeth)\n\telif beforeMeth == \"bounce\":\n\t\tbeforeMeth = 2\n\t\tprint beforeMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['before'].setValue(beforeMeth)\n\telif beforeMeth == \"black\":\n\t\tbeforeMeth = 3\n\t\tprint beforeMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['before'].setValue(beforeMeth)\n\nafIO = nuke.thisNode()\['afterIO'].value()\nprint afIO\n\nif afIO == True:\n\tafterMeth = nuke.thisNode()\['choiceAfterMethod'].value()\n\tif afterMeth == \"hold\":\n\t\tafterMeth = 0\n\t\tprint afterMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['after'].setValue(afterMeth)\n\telif afterMeth == \"loop\":\n\t\tafterMeth = 1\n\t\tprint afterMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['after'].setValue(afterMeth)\n\telif afterMeth == \"bounce\":\n\t\tafterMeth = 2\n\t\tprint afterMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['after'].setValue(afterMeth)\n\telif afterMeth == \"black\":\n\t\tafterMeth = 3\n\t\tprint afterMeth\n\t\tfor n in nuke.allNodes():\n    \t\t\tif n.name() in nuke.thisNode()\['list'].value():\n        \t\t\tn\['after'].setValue(afterMeth)"}
 addUserKnob {41 bookmark_1 l bookmark T StickyNote1.bookmark}
}

0 件のコメント:

コメントを投稿