set cut_paste_input [stack 0] version 10.0 v1 push 0 push $cut_paste_input Group { inputs 2 name ColorMerge help "Color Merge\n\nMerge the color from the Input \"Color\" to the footage in Input \"Lum\".\n\nIf the \"Mix Color\" slider is on 0, the color is keep from the Input \"Lum\".\nIt's possible to adjust the grading directly in this node before mix.\n" knobChanged "c = nuke.toNode('Copy3')\nif nuke.thisKnob().name() == 'inputChange':\n if nuke.thisNode().input(2) != None:\n c\['from0'].setValue('rgba.alpha')\n else:\n c\['from0'].setValue('none')" tile_color 0x7aa9ffff selected true xpos -346 ypos 1866 icon F_iconrgb.png addUserKnob {20 User l "Color Merge"} addUserKnob {41 which l " Mix Color" T Dissolve1.which} addUserKnob {26 S01 l " " T " "} addUserKnob {26 by1 l " " T " "} addUserKnob {26 by2 l " " T " "} addUserKnob {26 CGEV l " " t "\nEn cas de probleme, contacter Gaetan Baldy sur le chat\n" -STARTLINE T " v02 - CGEV - 2016"} addUserKnob {26 ""} addUserKnob {41 from0 l Mask T Copy3.from0} addUserKnob {41 disable_1 l Invert -STARTLINE T Invert1.disable} addUserKnob {41 alpha l "(Un)Premult by" T Unpremult1.alpha} addUserKnob {41 invert l Invert -STARTLINE T Unpremult1.invert} } Input { inputs 0 name Src xpos -89 ypos -933 } Dot { name Dot17 xpos -55 ypos -815 } set Ne6b16c00 [stack 0] Dot { name Dot5 xpos -409 ypos -815 } Dot { name Dot16 xpos -409 ypos 265 } set Ndcca4000 [stack 0] Dot { name Dot18 xpos -409 ypos 404 } set Nd9465800 [stack 0] Dot { name Dot6 xpos -409 ypos 460 } set N43b07c00 [stack 0] Dot { name Dot3 tile_color 0xffffffff xpos -409 ypos 576 } set N43b07800 [stack 0] Dot { name Dot7 xpos -409 ypos 749 } Input { inputs 0 name mask xpos 493 ypos 373 number 2 addUserKnob {20 User} addUserKnob {6 in +STARTLINE} in {{"\[exists input2]"}} } AddChannels { channels rgba name AddChannels3 xpos 493 ypos 505 } set N43b06c00 [stack 0] push $N43b06c00 Copy { inputs 2 to0 rgba.alpha name Copy3 xpos 493 ypos 531 disable {{!parent.mask.in}} } Invert { name Invert1 xpos 493 ypos 567 } push $N43b07800 push $Nd9465800 push $Ndcca4000 AddChannels { channels alpha name AddChannels1 xpos -281 ypos 255 } push $Ne6b16c00 Dot { name in xpos -55 ypos -684 } set Nd94e0c00 [stack 0] NoOp { name AlphaCheck xpos -225 ypos -688 addUserKnob {20 User} addUserKnob {6 alpha +STARTLINE} alpha {{"\[python \"len(\\\[n for n in nuke.channels(nuke.thisNode().input(0)) if n.find(\\\".a\\\") != -1])>0\"]"}} } AddChannels { channels rgba name AddAlpha xpos -225 ypos -662 } Dot { name Dot20 xpos -191 ypos -617 } push $Nd94e0c00 Copy { inputs 2 from0 rgba.alpha to0 rgba.alpha name Copy6 xpos -89 ypos -627 } Unpremult { alpha none name Unpremult1 xpos -89 ypos -552 disable {{!AlphaCheck.alpha}} } set N90c5dc00 [stack 0] Dot { name Dot4 xpos 97 ypos -548 } set N90c5d800 [stack 0] Input { inputs 0 name Color xpos 207 ypos -938 number 1 } NoOp { name ChannelCheck xpos 207 ypos -578 addUserKnob {20 User} addUserKnob {6 alpha +STARTLINE} alpha {{"\[python \"len(\\\[n for n in nuke.channels(nuke.thisNode().input(0)) if n.find(\\\".r\\\") != -1])>0\"]"}} } Switch { inputs 2 which {{!ChannelCheck.alpha}} name Switch2 xpos 207 ypos -552 } Clamp { channels rgb minimum 0.0001 maximum_enable false name Clamp1 xpos 207 ypos -509 } Dot { name Dot8 xpos 241 ypos -457 } set N90c5c800 [stack 0] Dot { name Dot15 xpos 351 ypos -457 } set N90c5c400 [stack 0] Dot { name Dot14 xpos 482 ypos -457 } set N90c5c000 [stack 0] Dot { name Dot13 xpos 592 ypos -457 } set Ndc535c00 [stack 0] Dot { name Dot12 xpos 727 ypos -457 } set Ndc535800 [stack 0] push $Ndc535800 Dot { name Dot11 xpos 837 ypos -457 } ColorMatrix { matrix { {0 0 0} {0 0 0} {1 1 1} } name ColorMatrix4 tile_color 0xffff xpos 803 ypos -376 } Merge2 { inputs 2 operation divide name Merge1 tile_color 0xffff xpos 693 ypos -376 } Dot { name Dot9 xpos 727 ypos -211 } push $N90c5c000 push $Ndc535c00 ColorMatrix { matrix { {0 0 0} {1 1 1} {0 0 0} } name ColorMatrix3 tile_color 0xff00ff xpos 558 ypos -378 } Merge2 { inputs 2 operation divide name Merge3 tile_color 0xff00ff xpos 448 ypos -378 } Dot { name Dot10 xpos 482 ypos -297 } push $N90c5c800 push $N90c5c400 ColorMatrix { matrix { {1 1 1} {0 0 0} {0 0 0} } name ColorMatrix2 tile_color 0xff0000ff xpos 317 ypos -379 } Merge2 { inputs 2 operation divide name Merge2 tile_color 0xff0000ff xpos 207 ypos -379 } Copy { inputs 2 from0 rgba.green to0 rgba.green name Copy1 xpos 207 ypos -306 } Copy { inputs 2 from0 rgba.blue to0 rgba.blue name Copy2 xpos 207 ypos -220 } Dot { name Dot2 xpos 241 ypos -73 } push $N90c5d800 ColorMatrix { matrix { {1 1 1} {1 1 1} {1 1 1} } name ColorMatrix1 tile_color 0xfefefeff xpos 63 ypos -378 } Merge2 { inputs 2 operation multiply name Merge4 xpos 63 ypos -77 } Dot { name Dot1 xpos 97 ypos 52 } push $N90c5dc00 MergeExpression { inputs 2 temp_name0 BY temp_expr0 "( 0.213*(Br<= 0.0031308 ? 12.92*Br : ( 1.055*pow(Br,1.0 / 2.4)) - 0.055)) + ( 0.715*(Bg<= 0.0031308 ? 12.92*Bg : ( 1.055*pow(Bg,1.0 / 2.4)) - 0.055)) + ( 0.072*(Bb<= 0.0031308 ? 12.92*Bb : ( 1.055*pow(Bb,1.0 / 2.4)) - 0.055))" temp_name1 APb temp_expr1 "(-0.115*(Ar<= 0.0031308 ? 12.92*Ar : ( 1.055*pow(Ar,1.0 / 2.4)) - 0.055)) + (-0.385*(Ag<= 0.0031308 ? 12.92*Ag : ( 1.055*pow(Ag,1.0 / 2.4)) - 0.055)) + ( 0.500*(Ab<= 0.0031308 ? 12.92*Ab : ( 1.055*pow(Ab,1.0 / 2.4)) - 0.055))" temp_name2 APr temp_expr2 "( 0.500*(Ar<= 0.0031308 ? 12.92*Ar : ( 1.055*pow(Ar,1.0 / 2.4)) - 0.055)) + (-0.454*(Ag<= 0.0031308 ? 12.92*Ag : ( 1.055*pow(Ag,1.0 / 2.4)) - 0.055)) + (-0.046*(Ab<= 0.0031308 ? 12.92*Ab : ( 1.055*pow(Ab,1.0 / 2.4)) - 0.055))" expr0 "(( 1.000*BY) + ( 0.000*APb) + ( 1.575*APr))<.04045 ? (( 1.000*BY) + ( 0.000*APb) + ( 1.575*APr))/12.92 : pow(((( 1.000*BY) + ( 0.000*APb) + ( 1.575*APr))+.055)/1.055, 2.4)" expr1 "(( 1.000*BY) + (-0.187*APb) + (-0.468*APr))<.04045 ? (( 1.000*BY) + (-0.187*APb) + (-0.468*APr))/12.92 : pow(((( 1.000*BY) + (-0.187*APb) + (-0.468*APr))+.055)/1.055, 2.4)" expr2 "(( 1.000*BY) + ( 1.856*APb) + ( 0.000*APr))<.04045 ? (( 1.000*BY) + ( 1.856*APb) + ( 0.000*APr))/12.92 : pow(((( 1.000*BY) + ( 1.856*APb) + ( 0.000*APr))+.055)/1.055, 2.4)" name WasherMerge1 xpos -89 ypos 48 } Copy { inputs 2 from0 rgba.alpha to0 rgba.alpha name Copy4 xpos -89 ypos 255 } Premult { alpha {{{parent.Unpremult1.alpha}}} invert {{parent.Unpremult1.invert}} name Premult2 xpos -89 ypos 334 disable {{!AlphaCheck.alpha}} } Merge2 { inputs 2 operation under bbox B name Merge5 xpos -89 ypos 400 disable {{"\[python -execlocal premult\\ =\\ nuke.thisGroup().knob('alpha').value()\\n\\nif\\ premult\\ ==\\ \\\"none\\\":\\n\\ ret\\ =\\ 1\\nelse:\\n\\ ret\\ =\\ 0]"}} } set Nd94a5800 [stack 0] push $N43b07c00 Dissolve { inputs 2 which 1 name Dissolve1 xpos -89 ypos 451 } set N730f4400 [stack 0] Keymix { inputs 3 name Keymix1 xpos -212 ypos 567 disable {{!parent.mask.in i}} } push $N730f4400 Switch { inputs 2 which {{Copy3.from0}} name Switch1 xpos -89 ypos 667 } CopyBBox { inputs 2 name CopyBBox1 xpos -89 ypos 745 } Output { name FranklinVFX xpos -89 ypos 866 } push $Nd94a5800 Viewer { frame_range 1-151 name Viewer1 selected true xpos -89 ypos -526 } end_group