123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541 |
- set cut_paste_input [stack 0]
- version 12.2 v5
- push $cut_paste_input
- Group {
- name HDR_PREPPER
- tile_color 1
- label "\[value lightname]"
- selected true
- xpos 232
- ypos -2
- addUserKnob {20 light_ctrls l "Light Controls"}
- addUserKnob {26 hdrPrepTag l INVISIBLE +INVISIBLE T "scoping sucks."}
- addUserKnob {2 root_path l "Output Folder" t "Choose the root path of where to output the exr's."}
- root_path /var/tmp
- addUserKnob {22 setAllFolders l "Set all to this folder" t "Set all other HDRPreppers' output folders in this script to the path from this node." -STARTLINE T "n = nuke.thisNode()\nout = n\['root_path'].value()\nallGroupNodes = nuke.allNodes('Group', group = nuke.root())\n\nfor i in allGroupNodes:\n if i.knob('hdrPrepTag'):\n i\['root_path'].setValue(out) \n"}
- addUserKnob {1 lightname l "Light Name" t "Specify a unique name for this light."}
- lightname light1
- addUserKnob {22 setNameForSel l "Set selected to this name" t "All other HDR_PREPPERs that you select in the nodegraph will have the same light name like this one (numbered consecutively)." -STARTLINE T "n = nuke.thisNode()\nwith nuke.root():\n sel = nuke.selectedNodes()\n\n#increase nummer list by number of HDR Preppers\n num=\[]\n for i in sel:\n if i.knob('hdrPrepTag'):\n num.append(i)\n\n num=len(num)\n\n name = n\['lightname'].getValue()\n base=name\[:-1]\n last=name\[-1]\n\n allGroupNodes = nuke.allNodes('Group', group = nuke.root())\n \n if sel == \[]:\n raise ValueError, 'No Nodes selected. Make sure to select other HDR_PREPPER Nodes.'\n else:\n pass\n\n#Set count to end number if there is one \n if last.isdigit() == True:\n count = int(last)\n else:\n count = 1\n\n#Set count one number higher than original name if its not included in the selection\n if not n in sel:\n count = count + 1\n\n#Set last number to \"1\" on this node if it doesnt have a number at the end\n\n if last.isdigit() == False:\n n\['lightname'].setValue(name + str(1)) \n else:\n pass\n\n while (count < num+1): \n for i in allGroupNodes:\n if i in sel:\n if i.knob('hdrPrepTag'):\n if last.isdigit() == False:\n newname=name + str(count)\n else:\n newname=base + str(count) \n i\['lightname'].setValue(newname) \n count = count + 1\n"}
- addUserKnob {41 Render -STARTLINE T Write1.Render}
- addUserKnob {20 EnvHDRGrp l "Env HDR Output" n 1}
- EnvHDRGrp 0
- addUserKnob {1 hdrname l "HDR Name" t "Specify a name for the environment HDR."}
- hdrname env
- addUserKnob {6 KeepInputFormat l "Keep Input Format" t "If checked the output will have the same format like the incoming format." +STARTLINE}
- addUserKnob {4 setFormat l "| Format" -STARTLINE M {256x128 512x256 1024x512 2048x1024 4096x2048 8192x4096 custom "" "" ""}}
- setFormat 1024x512
- addUserKnob {6 envConvolve l "EnvConvolve (c) Michael Garrett" t "Convolve the output. You must have the EnvConvolve gizmo installed, otherwhise it won't work." +STARTLINE}
- addUserKnob {7 exponent l "| exp" t "Set the environment convolution exponent. 1 represents a diffuse surface. Higher values exponentially increase specularity/glossiness." -STARTLINE R 1 100}
- exponent 40
- addUserKnob {22 createOut l "Create Env Output" T "sel = nuke.thisNode()\nformat = sel\['setFormat'].getValue()\n\nwith nuke.root():\n #create Reformat\n if sel\['KeepInputFormat'].value() == False:\n ref=nuke.nodes.Reformat()\n ref.setInput(0,sel)\n if format == 0:\n try:\n Latlong256\n except:\n Latlong256=nuke.addFormat('256 128 1')\n ref\['format'].setValue(Latlong256)\n \n if format == 1:\n try:\n Latlong512\n except:\n Latlong512=nuke.addFormat('512 256 1')\n ref\['format'].setValue(Latlong512)\n \n if format == 2:\n try:\n Latlong1k\n except:\n Latlong1k=nuke.addFormat('1024 512 1')\n ref\['format'].setValue(Latlong1k)\n \n if format == 3:\n try:\n Latlong2k\n except:\n Latlong2k=nuke.addFormat('2048 1024 1')\n ref\['format'].setValue(Latlong2k)\n \n if format == 4:\n try:\n Latlong4k\n except:\n Latlong4k=nuke.addFormat('4096 2048 1')\n ref\['format'].setValue(Latlong4k)\n \n if format == 5:\n try:\n Latlong8k\n except:\n Latlong8k=nuke.addFormat('8192 4096 1')\n ref\['format'].setValue(Latlong8k)\n\n if format == 6:\n customRes = nuke.getInput('Custom Resolution:', '128x64')\n if not 'x' in customRes:\n raise ValueError, 'Make sure to use a proper format (Width x Height). For example 1024x512'\n\n else:\n reslist = customRes.split('x')\n cRes = str(reslist\[0] + ' ' + reslist\[1] + ' 1')\n LatlongCustom=nuke.addFormat(cRes)\n ref\['format'].setValue(LatlongCustom)\n\n #create EnvConvolve\n if sel\['envConvolve'].value() == True: \n conv=nuke.nodes.EnvConvolve()\n if sel\['KeepInputFormat'].value() == False:\n conv.setInput(0,ref)\n else:\n conv.setInput(0,sel)\n exp=sel\['exponent'].getValue()\n conv\['phexp'].setValue(exp)\n conv\['label'].setValue('exp: \[value phexp]') \n \n\n #create Write Node\n wr=nuke.nodes.Write()\n if sel\['KeepInputFormat'].value() == False:\n if sel\['envConvolve'].value() == False:\n wr.setInput(0,ref)\n else:\n wr.setInput(0,conv)\n else:\n if sel\['envConvolve'].value() == False:\n wr.setInput(0,sel)\n else:\n wr.setInput(0,conv)\n\n wr\['channels'].setValue('rgba')\n outPath=sel\['root_path'].value()\n outName=sel\['hdrname'].value()\n wr\['file'].setValue(outPath + '/' + outName + '.exr')\n wr\['file_type'].setValue('exr')\n wr\['datatype'].setValue('32 bit float')\n" +STARTLINE}
- addUserKnob {20 endGroup_2 l endGroup n -1}
- addUserKnob {26 ""}
- addUserKnob {20 lightremoval l "Light Removal Settings" n 1}
- addUserKnob {41 area1 l Area t "Wrap this box tightly around the light source. This will define the output size of the extracted light." T Crop1.box}
- addUserKnob {41 size l "Edge Smudge" t "Control the amount of edge pixels sucked into the light-crop area. Increase this value if holes appear." T Smudge1.size}
- addUserKnob {14 FilterErode1_size l "Edge Extend" t "Extend the edges around the crop area to clean more of the surrounding pixels" R -100 100}
- FilterErode1_size -10
- addUserKnob {7 edge_blur1 l "Edge Blur" t "Blur the edges of the light-crop area." R 0 100}
- edge_blur1 10
- addUserKnob {6 rough_edge1 l "Rough Edge" t "Break up the edges. Best to be used with higher Edge Blur values." +STARTLINE}
- addUserKnob {7 bring_details1 l Details t "Bring back original Details." R 0 100}
- bring_details1 3.5
- addUserKnob {41 detail_blur1 l "Detail Blur" t "Soften the re-introduced Details." T detailBlur1.size}
- addUserKnob {41 useSingleColor l "Fill with constant color" t "Fill in the light area with a solid color." T Switch1.disable}
- addUserKnob {41 singleColor l Color t "The color to fill the light area with if \"Use constant color\" is checked." T Grade2.black}
- addUserKnob {20 endGroup n -1}
- addUserKnob {26 ""}
- addUserKnob {20 addCtrls l "Additional Controls" n 1}
- addUserKnob {6 output_lightmask l "Output Lights Mask" t "Outputs the masks of the lights into the alpha channel." +STARTLINE}
- output_lightmask true
- addUserKnob {0 Shuffle4_disable t "Wheter to apply the edge extensions and blurs to the mask or not." -STARTLINE +INVISIBLE}
- addUserKnob {20 endGroup_1 l endGroup n -1}
- }
- BackdropNode {
- inputs 0
- name BackdropNode1
- tile_color 0x565656ff
- label details
- note_font_size 42
- xpos -580
- ypos 1059
- bdwidth 428
- bdheight 279
- }
- Input {
- inputs 0
- name Input1
- xpos -3
- ypos 208
- }
- Dot {
- name Dot39
- xpos 31
- ypos 309
- }
- set N6831d400 [stack 0]
- Dot {
- name Dot38
- xpos -611
- ypos 309
- }
- Dot {
- name Dot37
- xpos -611
- ypos 2190
- }
- Input {
- inputs 0
- name Mask
- xpos -276
- ypos 692
- number 1
- }
- set N6831c800 [stack 0]
- push $N6831d400
- Shuffle {
- alpha white
- name Shuffle1
- label "\[value in]"
- xpos -3
- ypos 368
- }
- Dot {
- name Dot7
- xpos 31
- ypos 426
- }
- Dot {
- name Dot3
- xpos 31
- ypos 601
- }
- set N682cf800 [stack 0]
- Crop {
- box {250 100 450 300}
- name Crop1
- xpos -123
- ypos 637
- }
- ChannelMerge {
- inputs 2
- operation multiply
- name ChannelMerge2
- xpos -123
- ypos 680
- }
- add_layer {lightmaskOrig lightmaskOrig.red lightmaskOrig.green lightmaskOrig.blue lightmaskOrig.alpha}
- Shuffle {
- red alpha
- green alpha
- blue alpha
- out lightmaskOrig
- name Shuffle3
- label "\[value in]"
- xpos -123
- ypos 730
- }
- FilterErode {
- channels rgba
- size {{parent.FilterErode1_size.w} {parent.FilterErode1_size.h}}
- name FilterErode1
- xpos -123
- ypos 772
- }
- Blur {
- channels rgba
- size {{parent.edge_blur1}}
- name Blur1
- label "\[value size]"
- xpos -123
- ypos 811
- }
- Dot {
- name Dot31
- xpos -89
- ypos 882
- }
- set N682ce000 [stack 0]
- Dot {
- name Dot33
- xpos -159
- ypos 882
- }
- set N682cdc00 [stack 0]
- FilterErode {
- channels rgba
- size -12
- name FilterErode6
- xpos -193
- ypos 924
- }
- push $N682cdc00
- Dot {
- name Dot32
- xpos -255
- ypos 882
- }
- set N682cd400 [stack 0]
- Shuffle {
- red black
- green black
- blue black
- alpha black
- name Shuffle2
- label "\[value in]"
- xpos -289
- ypos 908
- }
- Noise {
- size 10.5
- gain 0.46
- gamma 0.635
- center {1024 778}
- name Noise1
- xpos -289
- ypos 957
- }
- Dot {
- name Dot4
- xpos -255
- ypos 1018
- }
- push $N682ce000
- Merge2 {
- inputs 2+1
- operation color-dodge
- name Merge16
- xpos -123
- ypos 1014
- disable {{!parent.rough_edge1}}
- }
- Blur {
- channels rgba
- size 4
- name Blur4
- label "\[value size]"
- xpos -123
- ypos 1061
- disable {{!parent.rough_edge1}}
- }
- Dot {
- name Dot9
- xpos -89
- ypos 1597
- }
- set N6827b800 [stack 0]
- Shuffle {
- in lightmaskOrig
- red alpha
- out alpha
- name Shuffle4
- label "\[value in]"
- xpos -123
- ypos 1677
- disable {{!parent.Shuffle4_disable}}
- }
- Dot {
- name Dot45
- xpos -89
- ypos 2017
- }
- push $N6827b800
- push $N682cd400
- Dot {
- name Dot2
- xpos -331
- ypos 882
- }
- push $N682cf800
- Dot {
- name Dot1
- xpos -441
- ypos 601
- }
- Colorspace {
- colorspace_out Cineon
- name Colorspace1
- label "\[value colorspace_in] >> \[value colorspace_out]"
- xpos -475
- ypos 1139
- }
- set N6827a400 [stack 0]
- push $N6827a400
- Blur {
- channels rgba
- size {{parent.bring_details1}}
- name details1
- label "\[value size]"
- xpos -570
- ypos 1187
- }
- Merge2 {
- inputs 2
- operation minus
- name Merge1
- xpos -475
- ypos 1233
- }
- Blur {
- channels rgba
- size 4
- name detailBlur1
- label "\[value size]"
- xpos -475
- ypos 1296
- }
- Merge2 {
- inputs 2
- operation mask
- name Merge3
- xpos -365
- ypos 1302
- }
- push $N682ce000
- push $N682cf800
- ChannelMerge {
- inputs 2
- operation stencil
- name ChannelMerge1
- xpos -3
- ypos 866
- }
- Premult {
- name Premult1
- xpos -3
- ypos 1057
- }
- Blur {
- channels rgba
- size {65 65}
- name Smudge1
- label "\[value size]"
- xpos -3
- ypos 1083
- }
- Unpremult {
- name Unpremult1
- xpos -3
- ypos 1121
- }
- Merge2 {
- inputs 2
- operation plus
- name Merge2
- xpos -3
- ypos 1302
- }
- Clamp {
- channels rgba
- maximum 10000
- name Clamp2
- xpos -3
- ypos 1328
- }
- push $N682cf800
- Dot {
- name Dot6
- xpos 122
- ypos 601
- }
- set N68a13400 [stack 0]
- Grade {
- black {0 0 0 0}
- multiply 0
- name Grade2
- xpos 88
- ypos 1335
- }
- Switch {
- inputs 2
- which 1
- name Switch1
- label singlecolor
- xpos -3
- ypos 1407
- }
- Shuffle {
- alpha black
- name Shuffle6
- label "\[value in]"
- xpos -3
- ypos 1445
- }
- Dot {
- name Dot5
- xpos 31
- ypos 1541
- }
- push $N6831d400
- Dot {
- name Dot10
- xpos 213
- ypos 309
- }
- Keymix {
- inputs 3
- channels rgba
- name Keymix1
- xpos 179
- ypos 1593
- }
- Grade {
- name clamp_blacks
- xpos 179
- ypos 1894
- }
- ChannelMerge {
- inputs 2
- name ChannelMerge4
- xpos 179
- ypos 2001
- }
- Clamp {
- channels alpha
- name Clamp1
- xpos 179
- ypos 2074
- }
- ShuffleCopy {
- inputs 2
- name ShuffleCopy1
- xpos 179
- ypos 2186
- disable {{parent.output_lightmask x1 1}}
- }
- Output {
- name Output1
- xpos 179
- ypos 2625
- }
- push $N6831c800
- push $N68a13400
- Dot {
- name Dot8
- xpos 327
- ypos 601
- }
- ChannelMerge {
- inputs 2
- operation multiply
- name ChannelMerge3
- xpos 293
- ypos 680
- }
- Premult {
- name Premult2
- xpos 293
- ypos 730
- }
- Crop {
- box {{Crop1.box} {Crop1.box} {Crop1.box} {Crop1.box}}
- softness {{Crop1.softness}}
- reformat true
- intersect {{Crop1.intersect}}
- crop {{Crop1.crop x1250 0}}
- name Crop1_clone1
- xpos 293
- ypos 756
- icon "\[value Crop1.icon]"
- bookmark {{Crop1.bookmark}}
- }
- Write {
- channels rgba
- file "\[value parent.root_path]/\[value parent.lightname].exr"
- colorspace linear
- raw true
- file_type exr
- datatype "32 bit float"
- first_part rgba
- version 4
- name Write1
- tile_color 0xb8b80001
- label "\nexr compression: \[value compression]"
- xpos 293
- ypos 782
- addUserKnob {20 Modules}
- addUserKnob {4 write_modules l module M {" " Comp_footage Comp_render Weekly "Weekly Resolution"}}
- addUserKnob {1 wm_layer l layer}
- addUserKnob {22 trixter_update_me +INVISIBLE T "try:\n import tx_nuke.write_modules as wm\n wm.update_node(nuke.thisNode())\nexcept: pass" +STARTLINE}
- addUserKnob {20 keller l Keller}
- addUserKnob {4 extension l Extension M {" " cin dpx exr hdr jpeg "mov\t\t\tffmpeg" mxf null pic png sgi targa tiff xpm yuv}}
- extension exr
- addUserKnob {4 subtask l 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 {--------------->}}
- addUserKnob {22 w_reload l Reload t "Reload Tasks" -STARTLINE T sceneControl.kenvWriteReloadSubTasks(nuke.thisNode())}
- addUserKnob {1 element l Element t "Optional Specifier. For example \[BG]_denoise. \[FG]_denoise."}
- addUserKnob {1 info l Info t "Optional Info before Framenumber.\nPRO_comp3d_001_010.comp3d_v008.\[acescg].%04d.exr"}
- addUserKnob {22 set l Set t "Set Output Path of this node" T sceneControl.kenvWriteSetPath(nuke.thisNode()) +STARTLINE}
- addUserKnob {26 divider1 l "" +STARTLINE}
- addUserKnob {6 ignore l "ignore in sceneControl" -STARTLINE}
- addUserKnob {26 divider2 l "" +STARTLINE}
- addUserKnob {22 playinrv l "Play in RV" t "Opens new instance of RV" T playInRV.playInRV(nuke.thisNode().knob('file').getValue(),0) +STARTLINE}
- 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)}
- 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)}
- addUserKnob {26 divider3 l "" +STARTLINE}
- addUserKnob {22 explore l Explore t "Open Folder" -STARTLINE T exploreThis.exploreThis()}
- addUserKnob {78 ver l Version +HIDDEN n 1}
- ver 1
- }
- NoOp {
- inputs 0
- name sceneCtrl
- tile_color 0x3379a401
- label "_\n__"
- selected true
- hide_input true
- addUserKnob {20 main l Main}
- addUserKnob {1 project l Project t "Project Shortname"}
- project HOTZ
- addUserKnob {4 dept l Dept t "Department. Changes tasks and servers." -STARTLINE M {comp anim cam dev model layout lookdev light shots sim}}
- addUserKnob {4 task l Task -STARTLINE M {comp denoise key layout neutralgrade prep stabilize dev}}
- addUserKnob {1 element l Element t "Optional Element." -STARTLINE}
- addUserKnob {22 reloadConfig l Reload t "Reload project config file." -STARTLINE T sceneControl.kenvDelete()}
- addUserKnob {1 season l Season +HIDDEN}
- season 01
- addUserKnob {1 episode l Episode +HIDDEN}
- episode 101
- addUserKnob {26 divider1 l "" +STARTLINE}
- addUserKnob {1 sequence l Seq t "can be a sequence number or gen when doing generic tasks.\n\ncomp_001_010.comp_v01.ms.nk\ncomp_gen.footageIngest_v01.ms.nk"}
- sequence 001
- addUserKnob {1 shot l Shot t "can be a shot number or gen in a multiShot context.\n\ncomp_001_010.comp_v01.ms.nk\ncomp_001_gen.comp_v01.ms.nk" -STARTLINE}
- shot 010
- addUserKnob {3 major_version l Major t "Increment Major Version and save script"}
- major_version 1
- addUserKnob {22 increment_major_version l + -STARTLINE T sceneControl.increment_major_version()}
- addUserKnob {3 minor_version l Minor t "Increment Minor Version and save script" -STARTLINE}
- minor_version 1
- addUserKnob {22 increment_minor_version l + -STARTLINE T sceneControl.increment_minor_version()}
- addUserKnob {22 save_script l Save t "Save Script with current Major and Minor" -STARTLINE T sceneControl.save_script()}
- addUserKnob {6 overwrite l Overwrite t "Automatically overwrite Scriptfiles without asking." -STARTLINE}
- addUserKnob {1 info l Info t "Additional (mandatory) File Info."}
- addUserKnob {1 user l User t "User Short. Reading Env Variable: USER" -STARTLINE}
- user ms
- addUserKnob {26 divider2 l "" +STARTLINE}
- addUserKnob {1 folder l Folder t "Save folder Preview." +DISABLED}
- folder "\$env(PROJECT_ROOT_2D)/300_work2D/comp/001/010/"
- addUserKnob {6 useEnvProjectRoot l "Use Env Project Root" t "Use env variables for 2d and 3d servers set in the site_config.\nUse these env variables before nuke startup." -STARTLINE}
- useEnvProjectRoot true
- addUserKnob {1 file l File t "Save file Preview." +DISABLED}
- file HOT_comp_001_010.comp_v001.001.ms.nk
- addUserKnob {26 divider3 l "" +STARTLINE}
- addUserKnob {3 fStart l Start t Startframe}
- fStart 1001
- addUserKnob {3 fCutIn l CutIn t CutIn -STARTLINE}
- fCutIn 1001
- addUserKnob {3 fCutOut l CutOut t CutOut -STARTLINE}
- fCutOut 1001
- addUserKnob {3 fEnd l End t Endframe -STARTLINE}
- fEnd 1001
- addUserKnob {22 get_framerange l "Get Range" t "Get Framerange from FTrack.\nPlease check you firewall rules and and allow ftrack ip 104.155.3.128 on port 443" -STARTLINE T sceneControl.get_framerange(nuke.thisNode())}
- addUserKnob {22 set_framerange l "Set Range" t "Set Framerange from SceneControl Interface" -STARTLINE T sceneControl.set_framerange(nuke.thisNode())}
- addUserKnob {43 comment l Comment}
- addUserKnob {3 layerNum l Slots +HIDDEN}
- addUserKnob {1 eval_helper +HIDDEN}
- addUserKnob {6 stereoToggle l "Stereo Toggle" -STARTLINE +HIDDEN}
- addUserKnob {1 precomp_output l "Precomp Output" +HIDDEN}
- addUserKnob {6 debug l Debug -STARTLINE +HIDDEN}
- debug true
- }
- end_group
- # Creation Time=Wed Jul 7 12:46:20 2021
- # Creator=Martin
|