No Description
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.

Preview_QT.nk 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. set cut_paste_input [stack 0]
  2. version 12.2 v5
  3. push $cut_paste_input
  4. Group {
  5. name Preview_QT
  6. tile_color 0xbfbf00ff
  7. label "h264 intra\n\[value nodeLabel]"
  8. selected true
  9. xpos 151
  10. ypos 68
  11. addUserKnob {20 ffmpeg}
  12. addUserKnob {35 presets M {"Prores 422" "knobs this \{ffmpeg_args \"-c:v prores_ks -profile:v 2 -qscale:v 7 -pix_fmt yuv444p10le -r 24 -vf colormatrix=bt601:bt709 -vendor ap10 -metadata:s encoder=\\\"Apple ProRes 422\\\"\" framerate 24 label \"Prores 422\\n\[value nodeLabel]\"\}" "Prores 422 HQ" "knobs this \{ffmpeg_args \"-c:v prores_ks -profile:v 3 -qscale:v 7 -pix_fmt yuv444p10le -r 24 -vf colormatrix=bt601:bt709 -vendor ap10 -metadata:s encoder=\\\"Apple ProRes 422 HQ\\\"\" framerate 24 label \"Prores 422 HQ\\n\[value nodeLabel]\"\}" "Prores 4444" "knobs this \{ffmpeg_args \"-c:v prores_ks -profile:v 4 -qscale:v 5 -pix_fmt yuv444p10le -r 24 -vf colormatrix=bt601:bt709 -vendor ap10 -metadata:s encoder=\\\"Apple ProRes 4444\\\"\\\"\" framerate 24 label \"Prores 4444\\n\[value nodeLabel]\"\}" "DNxHD 36" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p -b:v 36M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 36\\n\[value nodeLabel]\"\}" "DNxHD 115" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p -b:v 115M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 115\\n\[value nodeLabel]\"\}" "DNxHD 175" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p -b:v 175M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 175\\n\[value nodeLabel]\"\}" "DNxHD 175 10bit" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p10 -b:v 175M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 175 10bit\\n\[value nodeLabel]\"\}" "DNxHD 220 10bit" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p10 -b:v 220M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 220 10bit\\n\[value nodeLabel]\"\}" "DNxHR HQ" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -vf \\\"colormatrix=bt601:bt709\\\"\" framerate 24 label \"DNxHR HQ\\n\[value nodeLabel]\"\}" "DNxHR HQX" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhr_hqx -pix_fmt yuv422p10le -vf \\\"colormatrix=bt601:bt709\\\"\" framerate 24 label \"DNxHR HQX\\n\[value nodeLabel]\"\}" "DNxHR 444" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhr_444 -pix_fmt yuv444p10le -vf \\\"colormatrix=bt601:bt709\\\"\" framerate 24 label \"DNxHR 444\\n\[value nodeLabel]\"\}" "h264 standard" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high -crf 15 -preset slow -tune film -pix_fmt yuv420p -g 4 -bf 2 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 standard\\n\[value nodeLabel]\"\}" "h264 intra" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high -crf 12 -preset slow -tune film -pix_fmt yuv420p -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 intra\\n\[value nodeLabel]\"\}" "h264 intra 444" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high444 -crf 12 -preset slow -tune film -pix_fmt yuv444p -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 intra 444\\n\[value nodeLabel]\"\}" "h264 intra 444 10bit" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high444 -crf 12 -preset slow -tune film -pix_fmt yuv444p10le -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 intra 444 10bit\\n\[value nodeLabel]\"\}" "h265 standard 10bit" "knobs this \{ffmpeg_args \"-c:v libx265 -profile:v main10 -crf 15 -preset slow -tune psnr -pix_fmt yuv420p10le -g 2 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h265 standard 10bit\\n\[value nodeLabel]\"\}" "h265 intra 422 10bit" "knobs this \{ffmpeg_args \"-c:v libx265 -profile:v main422-10-intra -crf 12 -preset slow -tune psnr -pix_fmt yuv422p10le -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h265 intra 10bit\\n\[value nodeLabel]\"\}" "h265 intra 444 10bit" "knobs this \{ffmpeg_args \"-c:v libx265 -profile:v main444-10-intra -crf 12 -preset slow -tune psnr -pix_fmt yuv444p10le -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h265 intra 444 10bit\\n\[value nodeLabel]\"\}"}}
  13. addUserKnob {1 ffmpeg_args l "ffmpeg args"}
  14. ffmpeg_args "-c:v libx264 -profile:v high -crf 12 -preset slow -tune film -pix_fmt yuv420p -g 1 -bf 0 -vf colormatrix=bt601:bt709"
  15. addUserKnob {26 ""}
  16. addUserKnob {1 info t "Additional non-mandatory File Info"}
  17. addUserKnob {2 file t "output file"}
  18. file "\$env(PROJECT_ROOT_3D)/550_previewQTs/HOT_comp_001_010.comp_v001/HOT_comp_001_010.comp_v001.mov"
  19. addUserKnob {22 setfilepath l "Set Filepath" t "Creates a valid filename.\nUses the main task of SceneControl and points to the PreviewQT Dir." T "n = nuke.thisNode()\ninfo = n\['info'].value()\nffmpeg_args = n\['ffmpeg_args'].value()\n\nif 'dnxhd' in ffmpeg_args:\n extension = 'mov'\nif 'libx264' in ffmpeg_args:\n extension = 'mp4'\nif 'libx265' in ffmpeg_args:\n extension = 'mp4'\nif 'prores' in ffmpeg_args:\n extension = 'mov'\n\noutputpath = sceneControl.kenvQuery('PREVIEW_QT_FILE', minor_version=None, info=info, ext=extension)\n\nn.knobs()\[\"file\"].setValue(outputpath)\n\n# create label for displaying the generated output\n# autoLabel = \"n.name() + '\\\\n' +n\['file'].value().split('/')\[-1] + '\\\\n' + n\['label'].value()\"\n# n\['autolabel'].setValue(autoLabel)" +STARTLINE}
  20. addUserKnob {26 ""}
  21. addUserKnob {1 burnNameText l burn-in}
  22. burnNameText "\[python \{nuke.thisNode().knobs()\['file'].value().split('/')\[-1].replace('.mp4','').replace('.mov','')\}]"
  23. addUserKnob {20 config n 1}
  24. config 0
  25. addUserKnob {1 ffmpeg_cmd l command t "Enter the path to the ffmpeg executable. \nWindows:\nffmpeg.exe uses the ffmpeg provided with the nuke tool.\n\nLinux/MacOS (untested!)\nffmpeg without a path will use the environment."}
  26. ffmpeg_cmd ffmpeg.exe
  27. addUserKnob {1 nodeLabel l label t "used for node labelling."}
  28. nodeLabel "\[python \{nuke.thisNode().knobs()\['file'].value().split('/')\[-1]\}]"
  29. addUserKnob {1 helper t "Expression string if you want to derive the burn-in via expression from SceneControl config."}
  30. helper "\[value sceneCtrl.project]_\[value sceneCtrl.dept]_\[value sceneCtrl.sequence]_\[value sceneCtrl.shot].\[value sceneCtrl.task]_v\[format %03s \[value sceneCtrl.major_version]]"
  31. addUserKnob {1 helper2 l helper t "Default string for burn-in name."}
  32. helper2 "\[python \{nuke.thisNode().knobs()\['file'].value().split('/')\[-1].replace('.mp4','').replace('.mov','')\}]"
  33. addUserKnob {7 fontScale l "font scale"}
  34. fontScale 0.25
  35. addUserKnob {20 endGroup_defaults l "endGroup Defaults" n -1}
  36. addUserKnob {6 burnName l "Burn-in Name" +STARTLINE}
  37. burnName true
  38. addUserKnob {6 burnFrame l "Burn-in Frame" -STARTLINE}
  39. burnFrame true
  40. addUserKnob {26 ""}
  41. addUserKnob {7 framerate R 23 30}
  42. framerate {{"\[python \{nuke.root().knobs()\['fps'].value()\}]"}}
  43. addUserKnob {1 framerange -STARTLINE}
  44. framerange 1001-1109
  45. addUserKnob {22 set_framerange l "Set to Input" -STARTLINE T "n = nuke.thisNode()\nfr = n.frameRange()\nn\['framerange'].setValue(\"\{0\}-\{1\}\".format(fr.first(), fr.last()))"}
  46. addUserKnob {22 set_sc_framerange l "Set Framerange" t "Set framerange from SceneControl." -STARTLINE T "c = nuke.exists(\"sceneCtrl\")\nif c:\n sc = nuke.toNode('sceneCtrl')\n \n n = nuke.thisNode()\n n\['framerange'].setValue(\"\{0\}-\{1\}\".format(int(sc.knobs()\['fStart'].getValue()), int(sc.knobs()\['fEnd'].getValue())))\nelse:\n print('No SceneControl found.')\n"}
  47. addUserKnob {22 render l Render t "Saves your scene and renders.\nSee the progress in the Nuke Console Window." T "import ffmpeg_render\nffmpeg_render.prep()" +STARTLINE}
  48. addUserKnob {20 help_1 l Help}
  49. addUserKnob {26 helptext l "Help " T "1. choose preset\n\n2. set info if needed\n\n3. <Set Filepath>\n\n4. enable or disable burn ins\n\n5. <Render>\n\n6. Look at the Nuke Console for progress\n"}
  50. }
  51. Input {
  52. inputs 0
  53. name Input
  54. xpos -40
  55. ypos -112
  56. }
  57. Dot {
  58. name Dot66
  59. xpos -6
  60. ypos -16
  61. }
  62. set N7f514400 [stack 0]
  63. Text2 {
  64. font_size_toolbar 100
  65. font_width_toolbar 100
  66. font_height_toolbar 100
  67. message "\[value parent.burnNameText]"
  68. old_message {{72 79 84 95 99 111 109 112 95 48 48 49 95 48 49 48 46 99 111 109 112 95 118 48 48 49}
  69. }
  70. old_expression_markers {{0 25}
  71. }
  72. box {15 5 {box.x+600 x1001 525} 100}
  73. yjustify bottom
  74. transforms {{0 2}
  75. }
  76. cursor_position 27
  77. font {{ Arial : Regular : arial.ttf : 0 }}
  78. global_font_scale {{"\[value parent.fontScale]"}}
  79. scale {1 1}
  80. cursor_initialised true
  81. autofit_bbox false
  82. initial_cursor_position {{27.5 118.5}
  83. }
  84. group_animations {{0} imported: 0 selected: items: "root transform/"}
  85. animation_layers {{1 11 1024 778 0 0 1 1 0 0 0 0}
  86. }
  87. name Text_SHOTNAME1
  88. xpos -163
  89. ypos -19
  90. }
  91. push $N7f514400
  92. Switch {
  93. inputs 2
  94. which {{"\[value parent.burnName]"}}
  95. name switch_name
  96. xpos -40
  97. ypos 41
  98. }
  99. Dot {
  100. name Dot1
  101. xpos -6
  102. ypos 79
  103. }
  104. set N434f7400 [stack 0]
  105. Text2 {
  106. font_size_toolbar 100
  107. font_width_toolbar 100
  108. font_height_toolbar 100
  109. message "\[format %04s \[frame]]"
  110. old_message {{48 48 48 49}
  111. }
  112. old_expression_markers {{0 3}
  113. }
  114. box {{width-15-500} 5 {width-15} 100}
  115. xjustify right
  116. yjustify bottom
  117. transforms {{0 2}
  118. }
  119. font_size_values {{0 100 1 100 2 100 3 100}
  120. }
  121. baseline_values {{0 0 1 0 2 0 3 0}
  122. }
  123. cursor_position 21
  124. font {{ Arial : Regular : arial.ttf : 0 }}
  125. global_font_scale {{"\[value parent.fontScale]"}}
  126. scale {1 1}
  127. cursor_initialised true
  128. autofit_bbox false
  129. initial_cursor_position {{1876.5 146.5}
  130. }
  131. group_animations {{0} imported: 0 selected: items: "root transform"}
  132. animation_layers {{1 11 1024 778 0 0 1 1 0 0 0 0}
  133. }
  134. name Text_FRAMECOUNT1
  135. xpos -164
  136. ypos 76
  137. }
  138. push $N434f7400
  139. Switch {
  140. inputs 2
  141. which {{"\[value parent.burnFrame]"}}
  142. name switch_frame
  143. xpos -40
  144. ypos 136
  145. }
  146. Write {
  147. raw true
  148. file_type tiff
  149. datatype "16 bit"
  150. compression none
  151. checkHashOnRead false
  152. version 486
  153. name write_tmp
  154. selected true
  155. xpos -40
  156. ypos 246
  157. addUserKnob {20 keller l Keller}
  158. addUserKnob {4 subtask t "Defaults to the Task selected in sceneControl, ignoring Element and Info.\nAll other subtasks are pre-renders and get rendered into the precomp (=prerender) directory." M {scriptTask denoise key neutralgrade prerender stabilize}}
  159. addUserKnob {22 w_reload l Reload t "Reload Tasks" -STARTLINE T sceneControl.kenvWriteReloadSubTasks(nuke.thisNode())}
  160. addUserKnob {1 element l Element t "Optional Specifier. For example \[BG]_denoise. \[FG]_denoise."}
  161. addUserKnob {1 info l Info t "Optional Info before Framenumber.\nPRO_comp3d_001_010.comp3d_v008.\[acescg].%04d.exr"}
  162. addUserKnob {22 set l Set t "Set Output Path of this node" T sceneControl.kenvWriteSetPath(nuke.thisNode()) +STARTLINE}
  163. addUserKnob {26 divider1 l "" +STARTLINE}
  164. addUserKnob {6 ignore l "ignore in sceneControl" -STARTLINE}
  165. ignore true
  166. addUserKnob {26 divider2 l "" +STARTLINE}
  167. addUserKnob {22 playinrv l "Play in RV" t "Opens new instance of RV" T playInRV.playInRV(nuke.thisNode().knob('file').getValue(),0) +STARTLINE}
  168. addUserKnob {22 pushtorv l "Push to RV" t "Push to tagged RV. Will open RV and uses this instance to directly push sequences." -STARTLINE T playInRV.playInRV(nuke.thisNode().knob('file').getValue(),1)}
  169. addUserKnob {22 pushtorvappend l "Push to RV (append)" t "Push to RV and append to existing sources" -STARTLINE T playInRV.playInRV(nuke.thisNode().knob('file').getValue(),2)}
  170. addUserKnob {26 divider3 l "" +STARTLINE}
  171. addUserKnob {22 explore l Explore t "Open Folder" -STARTLINE T exploreThis.exploreThis()}
  172. }
  173. Output {
  174. name Output
  175. xpos -40
  176. ypos 355
  177. }
  178. StickyNote {
  179. inputs 0
  180. name StickyNote1
  181. label keep_name!
  182. xpos 60
  183. ypos 253
  184. }
  185. end_group