Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TX_Bloom.gizmo 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. #! /Applications/Nuke8.0v2/Nuke8.0v2.app/Contents/MacOS/libnuke-8.0.v2.dylib -nx
  2. version 8.0 v2
  3. Group {
  4. name TX_Bloom
  5. inputs 2
  6. knobChanged "\nthisNode = nuke.thisNode()\nthisKnob = nuke.thisKnob()\n\n\nif thisKnob.name() == 'quality' :\n \n quality = int(thisNode\['quality'].value())\n \n thisNode.begin()\n dotIN = nuke.toNode('Dot_IN')\n dotOUT = nuke.toNode('Dot_OUT')\n merge = nuke.toNode('Merge_master')\n Xpos = nuke.toNode('Blur_master').xpos()\n Ypos = nuke.toNode('Blur_master').ypos()\n \n for n in nuke.allNodes('Blur'):\n if n.name() not in \['Blur_original', 'Blur_master']:\n nuke.delete(n)\n \n nuke.delete(merge)\n merge = nuke.nodes.Merge2(xpos = Xpos,\n ypos = Ypos+250)\n merge.setName('Merge_master')\n merge\['operation'].setValue('plus')\n merge.setInput(0, nuke.toNode('Blur_master'))\n merge\['Achannels'].setExpression('parent.Blur_master.channels')\n merge\['Bchannels'].setExpression('parent.Blur_master.channels')\n merge\['output'].setExpression('parent.Blur_master.channels')\n dotOUT.setInput(0,merge)\n \n \n for n in range(quality):\n blur=nuke.nodes.Blur(xpos = Xpos-(n+1)*100,\n ypos= Ypos)\n blur.setName('Blur_'+str(n+1))\n blur\['channels'].setExpression('parent.Blur_master.channels')\n blur\['size'].setValue(\[0,0])\n blur\['size'].setExpression('parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) ')\n blur\['crop'].setExpression('parent.crop')\n blur.setInput(0,dotIN)\n if n==0:\n merge.setInput(n+1,blur)\n else :\n merge.setInput(n+2,blur)\n"
  7. tile_color 0xcc804eff
  8. addUserKnob {20 User l Settings}
  9. addUserKnob {41 channels T Blur_master.channels}
  10. addUserKnob {14 size R 0 100}
  11. size 1
  12. addUserKnob {7 scaling}
  13. scaling 1
  14. addUserKnob {4 type M {linear exponential}}
  15. type exponential
  16. addUserKnob {3 quality l "" -STARTLINE}
  17. quality 5
  18. addUserKnob {6 crop l "crop to format" -STARTLINE}
  19. crop true
  20. addUserKnob {7 softenOrig l "soften original" R 0 100}
  21. addUserKnob {6 ontop l "add on top " -STARTLINE}
  22. addUserKnob {26 dummy1 l "" +STARTLINE T " "}
  23. addUserKnob {4 mask M {none alpha "RGB luminance" ""}}
  24. addUserKnob {6 maskInvert l invert -STARTLINE}
  25. addUserKnob {3 maskInputTest l INVISIBLE -STARTLINE +INVISIBLE}
  26. maskInputTest {{"\[python -execlocal n\\ =\\ nuke.thisNode()\\nif\\ n.input(1)\\ ==\\ None\\ :\\n\\ \\ \\ \\ ret\\ =\\ 1\\nelse\\ :\\n\\ \\ \\ \\ ret\\ =\\ 0]"}}
  27. addUserKnob {26 dummy2 l "" +STARTLINE T " "}
  28. addUserKnob {41 white l gain T Grade.white}
  29. addUserKnob {41 gamma T Grade.gamma}
  30. addUserKnob {26 "" +STARTLINE}
  31. addUserKnob {26 credits l "" +STARTLINE T "TX_Bloom v1.0 - Tomas Lefebvre (c)\n"}
  32. }
  33. Input {
  34. inputs 0
  35. name Input
  36. xpos -250
  37. ypos -444
  38. }
  39. Dot {
  40. name Dot4
  41. xpos -216
  42. ypos -385
  43. }
  44. set N1d639150 [stack 0]
  45. Shuffle {
  46. red black
  47. green black
  48. blue black
  49. alpha black
  50. name Shuffle2
  51. xpos -106
  52. ypos -389
  53. }
  54. Input {
  55. inputs 0
  56. name Mask
  57. xpos 113
  58. ypos -419
  59. number 1
  60. addUserKnob {20 User}
  61. }
  62. Switch {
  63. inputs 2
  64. which {{parent.maskInputTest i}}
  65. name Switch_test
  66. xpos 113
  67. ypos -389
  68. }
  69. Dot {
  70. name Dot3
  71. xpos 147
  72. ypos -316
  73. }
  74. set N17c501a0 [stack 0]
  75. Colorspace {
  76. colorspace_out CIE-Lab
  77. name Colorspace1
  78. xpos 113
  79. ypos -272
  80. }
  81. Shuffle {
  82. green red
  83. blue red
  84. alpha red
  85. name Shuffle1
  86. xpos 113
  87. ypos -246
  88. }
  89. push $N17c501a0
  90. Clamp {
  91. name Clamp1
  92. xpos -13
  93. ypos -326
  94. }
  95. Switch {
  96. inputs 2
  97. which {{"parent.mask == 2 ? 1 : 0" i}}
  98. name Switch_mask
  99. xpos -13
  100. ypos -246
  101. }
  102. push $N1d639150
  103. Multiply {
  104. inputs 1+1
  105. channels {{{parent.Blur_master.channels}}}
  106. value 0
  107. invert_mask {{parent.maskInvert i}}
  108. name Multiply_mask
  109. xpos -250
  110. ypos -246
  111. disable {{parent.mask==0?1:0 i x1001 1}}
  112. }
  113. Dot {
  114. name Dot_IN
  115. xpos -216
  116. ypos -182
  117. }
  118. set N2db560 [stack 0]
  119. Blur {
  120. channels {{{parent.Blur_master.channels}}}
  121. size {{"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "} {"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "}}
  122. crop {{parent.crop}}
  123. name Blur_5
  124. xpos -750
  125. ypos 44
  126. }
  127. push $N2db560
  128. Blur {
  129. channels {{{parent.Blur_master.channels}}}
  130. size {{"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "} {"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "}}
  131. crop {{parent.crop}}
  132. name Blur_4
  133. xpos -650
  134. ypos 44
  135. }
  136. push $N2db560
  137. Blur {
  138. channels {{{parent.Blur_master.channels}}}
  139. size {{"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "} {"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "}}
  140. crop {{parent.crop}}
  141. name Blur_3
  142. xpos -550
  143. ypos 44
  144. }
  145. push $N2db560
  146. Blur {
  147. channels {{{parent.Blur_master.channels}}}
  148. size {{"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "} {"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "}}
  149. crop {{parent.crop}}
  150. name Blur_2
  151. xpos -450
  152. ypos 44
  153. }
  154. push 0
  155. push $N2db560
  156. Blur {
  157. channels {{{parent.Blur_master.channels}}}
  158. size {{"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "} {"parent.type == 0 ? parent.size*scaling*2*int(\[string range \[value name] 5 end]) : parent.size*scaling*pow(2,int(\[string range \[value name] 5 end])) "}}
  159. crop {{parent.crop}}
  160. name Blur_1
  161. xpos -350
  162. ypos 44
  163. }
  164. push $N2db560
  165. Blur {
  166. channels rgba
  167. size {{parent.size i} {parent.size i}}
  168. crop {{parent.crop i}}
  169. name Blur_master
  170. xpos -250
  171. ypos 44
  172. }
  173. Merge2 {
  174. inputs 6+1
  175. operation plus
  176. Achannels {{{parent.Blur_master.channels}}}
  177. Bchannels {{{parent.Blur_master.channels}}}
  178. output {{{parent.Blur_master.channels}}}
  179. name Merge_master
  180. xpos -250
  181. ypos 294
  182. }
  183. Dot {
  184. name Dot_OUT
  185. xpos -216
  186. ypos 389
  187. }
  188. set N1d640bb0 [stack 0]
  189. push $N2db560
  190. Dot {
  191. name Dot2
  192. xpos -30
  193. ypos -182
  194. }
  195. Blur {
  196. channels {{{parent.Blur_master.channels}}}
  197. size {{parent.softenOrig i}}
  198. crop {{parent.crop i}}
  199. name Blur_original
  200. xpos -57
  201. ypos 307
  202. }
  203. Merge2 {
  204. inputs 2
  205. operation plus
  206. Achannels {{{parent.Blur_master.channels}}}
  207. Bchannels {{{parent.Blur_master.channels}}}
  208. output {{{parent.Blur_master.channels}}}
  209. name Merge2
  210. xpos -57
  211. ypos 379
  212. }
  213. Dot {
  214. name Dot1
  215. xpos -23
  216. ypos 472
  217. }
  218. push $N1d640bb0
  219. Switch {
  220. inputs 2
  221. which {{parent.ontop i}}
  222. name Switch1
  223. xpos -250
  224. ypos 468
  225. }
  226. Grade {
  227. channels {{{parent.Blur_master.channels}}}
  228. black_clamp false
  229. name Grade
  230. xpos -250
  231. ypos 544
  232. }
  233. Output {
  234. name Output1
  235. xpos -250
  236. ypos 620
  237. }
  238. end_group