Advertisement
Totheroo

Nuke - Image Plane Plus

Feb 17th, 2022
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.59 KB | None | 0 0
  1. set cut_paste_input [stack 0]
  2. version 12.2 v7
  3. push $cut_paste_input
  4. Group {
  5. name ImagePlane3D4
  6. knobChanged "n = nuke.thisNode()\nk = nuke.thisKnob()\n\nif k.name() == 'inputChange':\n n\['distanceAxis'].setVisible(n\[\"isOn\"].value())\n n.knob('distance').setVisible(not n\[\"isOn\"].value())\n \nif k.name() == 'result':\n result = n.knob('result').getValue()\n if result == 0:\n n.knob('samples').setVisible(True)\n n.knob('motionblur').setVisible(False)\n elif result == 1 or result == 2 or result == 3 :\n n.knob('samples').setVisible(False)\n n.knob('motionblur').setVisible(True)\n"
  7. tile_color 0x3121a5ff
  8. label "ref \[value refFrame] dis: \[value distance]\n"
  9. note_font Verdana
  10. note_font_color 0xffffffff
  11. selected true
  12. xpos -370
  13. ypos -213
  14. addUserKnob {20 imagePlane3D l ImagePlane3D}
  15. addUserKnob {4 output l "<b><font color=skyblue>Output:" M {Stabilize Matchmove "" "" ""}}
  16. output Matchmove
  17. addUserKnob {4 result l Result: M {"3D Projection Setup" "Card3D Setup" "Live (Reconcile3D)" "Baked (Cornerpin)" "" "" "" "" "" "" ""}}
  18. result "Baked (Cornerpin)"
  19. addUserKnob {26 status l " Status:" T "<b> <font color=lime> Is Baked on Frames: 1001-1030"}
  20. addUserKnob {3 refFrame l "Ref Frame"}
  21. refFrame 1001
  22. addUserKnob {22 setRefFrame l "Set Ref Frame" -STARTLINE T "n = nuke.thisNode()\nref = n.knob('refFrame')\nframe = nuke.frame()\n\nref.setValue(frame)"}
  23. addUserKnob {7 distance l DistanceFromCam R 0 1000}
  24. distance 1.1
  25. addUserKnob {22 bakeFramerange l "<font color = lime>Bake FrameRange" T "import time\nimport threading\n\nn = nuke.thisNode()\n#Define this node\n\nstatus = n.knob(\"status\")\nresult = n.knob('result')\n\nr1 = nuke.toNode(\"Reconcile3DTL\")\nr2 = nuke.toNode(\"Reconcile3DTR\")\nr3 = nuke.toNode(\"Reconcile3DBL\")\nr4 = nuke.toNode(\"Reconcile3DBR\")\nrL = \[r1,r2,r3,r4]\n# Define reconcile3D nodes\n\n#bcg = n.knob(\"bakeColors\")\n\ncps = nuke.toNode(\"CornerPin2DBakedStabilize\")\ncpm = nuke.toNode(\"CornerPin2DBakedMatchmove\")\n# Define cornerpin node\n\nfirst_frame = int(nuke.Root()\['first_frame'].getValue())\nlast_frame = int(nuke.Root()\['last_frame'].getValue())\n# Grab first and last frame from root\n\np = nuke.Panel(\"Execute on FrameRange\")\np.addSingleLineInput('First Frame', first_frame)\np.addSingleLineInput('Last Frame', last_frame)\np.addSingleLineInput('Increment', 1)\nif p.show():\n# Create user input panel\n \n ff = int(p.value(\"First Frame\"))\n lf = int(p.value(\"Last Frame\"))\n i = int(p.value(\"Increment\"))\n # Define first, last, increment from user input panel\n \n #k = \"status\"\n l = \"<b> <font color=lime> Is Baked on Frames:\" + \" \" + str(ff) + \"-\" + str(lf)\n status.setValue(l)\n # Change status of node\n \n result.setValue(3)\n \n with n:\n r1\[\"calc_output\"].setValue(0)\n r2\[\"calc_output\"].setValue(0)\n r3\[\"calc_output\"].setValue(0)\n r4\[\"calc_output\"].setValue(0)\n # turn off live status of reconcile3Ds\n \n r1\[\"output\"].clearAnimated()\n r1\[\"outputxyz\"].clearAnimated()\n r2\[\"output\"].clearAnimated()\n r2\[\"outputxyz\"].clearAnimated()\n r3\[\"output\"].clearAnimated()\n r3\[\"outputxyz\"].clearAnimated()\n r4\[\"output\"].clearAnimated()\n r4\[\"outputxyz\"].clearAnimated()\n # Clear any data from all Reconcile3D nodes\n \n def execute(first,last,inc):\n runMe = True\n while runMe == True:\n nuke.execute(r1,first,last,inc) \n nuke.execute(r2,first,last,inc)\n nuke.execute(r3,first,last,inc)\n nuke.execute(r4,first,last,inc)\n stop_event.set()\n runMe = False\n print 'Reconcile3Ds done'\n break\n # Define Reconcile3D execution function\n \n global stop_event \n stop_event = threading.Event()\n threading.Thread(target=execute, kwargs=dict(first=ff,last=lf,inc=i) ).start() \n while not stop_event.is_set():\n time.sleep(0.1)\n # run Reconcile3Ds with threading\n \n cps\[\"from4\"].copyAnimations(r1\[\"output\"].animations())\n cps\[\"from3\"].copyAnimations(r2\[\"output\"].animations())\n cps\[\"from1\"].copyAnimations(r3\[\"output\"].animations())\n cps\[\"from2\"].copyAnimations(r4\[\"output\"].animations())\n \n cpm\[\"to4\"].copyAnimations(r1\[\"output\"].animations())\n cpm\[\"to3\"].copyAnimations(r2\[\"output\"].animations())\n cpm\[\"to1\"].copyAnimations(r3\[\"output\"].animations())\n cpm\[\"to2\"].copyAnimations(r4\[\"output\"].animations())\n # copy reconcile3D values over to cornerpins\n \n r1\[\"output\"].clearAnimated()\n r1\[\"outputxyz\"].clearAnimated()\n r2\[\"output\"].clearAnimated()\n r2\[\"outputxyz\"].clearAnimated()\n r3\[\"output\"].clearAnimated()\n r3\[\"outputxyz\"].clearAnimated()\n r4\[\"output\"].clearAnimated()\n r4\[\"outputxyz\"].clearAnimated()\n # clear animation from live reconcile3Ds\n \n r1\[\"calc_output\"].setValue(1)\n r2\[\"calc_output\"].setValue(1)\n r3\[\"calc_output\"].setValue(1)\n r4\[\"calc_output\"].setValue(1)\n # make reconcile3ds live again\n " +STARTLINE}
  26. addUserKnob {22 clearBaked l "<font color = orangered>Clear Baked" -STARTLINE T "n = nuke.thisNode()\nw = n.width()\nh = n.height()\nresult = n.knob('result')\n\ncps = nuke.toNode(\"CornerPin2DBakedStabilize\")\ncpm = nuke.toNode(\"CornerPin2DBakedMatchmove\")\nstatus = n.knob(\"status\")\n\ncpsfrom1 = cps.knob(\"from1\")\ncpsfrom2 = cps.knob(\"from2\")\ncpsfrom3 = cps.knob(\"from3\")\ncpsfrom4 = cps.knob(\"from4\")\n\ncpmto1 = cpm.knob(\"to1\")\ncpmto2 = cpm.knob(\"to2\")\ncpmto3 = cpm.knob(\"to3\")\ncpmto4 = cpm.knob(\"to4\")\n\ncpsfrom1.clearAnimated()\ncpsfrom2.clearAnimated()\ncpsfrom3.clearAnimated()\ncpsfrom4.clearAnimated()\ncpmto1.clearAnimated()\ncpmto2.clearAnimated()\ncpmto3.clearAnimated()\ncpmto4.clearAnimated()\n\ncpsfrom1.setValue(0,0)\ncpsfrom1.setValue(0,1)\ncpsfrom2.setValue(w,0)\ncpsfrom2.setValue(0,1)\ncpsfrom3.setValue(w,0)\ncpsfrom3.setValue(h,1)\ncpsfrom4.setValue(0,0)\ncpsfrom4.setValue(h,1)\n\ncpmto1.setValue(0,0)\ncpmto1.setValue(0,1)\ncpmto2.setValue(w,0)\ncpmto2.setValue(0,1)\ncpmto3.setValue(w,0)\ncpmto3.setValue(h,1)\ncpmto4.setValue(0,0)\ncpmto4.setValue(h,1)\n\nstatus.setValue(\"<font color=salmon> Is NOT Baked\")\nresult.setValue(2)"}
  27. addUserKnob {22 exportBakedTrack l "<font color = violet>Export Baked CornerPin" T "n = nuke.thisNode()\n\ncps = nuke.toNode(\"CornerPin2DBakedStabilize\")\ncpsName = str(n.name())\nrefFrame = int(n.knob(\"refFrame\").value())\ndist = n.knob(\"distance\").value()\n\ncpsfrom1 = cps.knob(\"from1\")\ncpsfrom2 = cps.knob(\"from2\")\ncpsfrom3 = cps.knob(\"from3\")\ncpsfrom4 = cps.knob(\"from4\")\n\nwith nuke.Root():\n posX = n.knob(\"xpos\").value()\n posY = n.knob(\"ypos\").value()\n nukescripts.clear_selection_recursive()\n cpn = nuke.createNode('CornerPin2D')\n cpn.setName(cpsName + \"_CnrPin\")\n cpn.knob('xpos').setValue(posX +100)\n cpn.knob('ypos').setValue(posY +70)\n cpn.autoplace()\n cpn.setInput(0, None)\n \n cpnto1 = cpn.knob('to1')\n cpnto2 = cpn.knob('to2')\n cpnto3 = cpn.knob('to3')\n cpnto4 = cpn.knob('to4')\n \n cpnfrom1 = cpn.knob('from1')\n cpnfrom2 = cpn.knob('from2')\n cpnfrom3 = cpn.knob('from3')\n cpnfrom4 = cpn.knob('from4')\n \n cpnfrom1.copyAnimations(cpsfrom1.animations())\n cpnfrom2.copyAnimations(cpsfrom2.animations())\n cpnfrom3.copyAnimations(cpsfrom3.animations())\n cpnfrom4.copyAnimations(cpsfrom4.animations())\n \n tab = nuke.Tab_Knob('settings', 'Settings')\n \n setCurrentFrameBtn = nuke.PyScript_Knob(\"setCurrentFrame\", \"Set to Current Frame\")\n setCurrentFrameBtn.setCommand('n = nuke.thisNode()\\nrefFrame = n.knob(\"refFrame\")\\nrefFrame.setValue(nuke.frame())\\nrefFrame = refFrame.getValue()\\noutput = n.knob(\"output\")\\nto1 = n.knob(\"to1\")\\nto2 = n.knob(\"to2\")\\nto3 = n.knob(\"to3\")\\nto4 = n.knob(\"to4\")\\nfrom1 = n.knob(\"from1\")\\nfrom2 = n.knob(\"from2\")\\nfrom3 = n.knob(\"from3\")\\nfrom4 = n.knob(\"from4\")\\nif output.getValue() == 0:\\n to1.setValue(from1.getValueAt(refFrame))\\n to2.setValue(from2.getValueAt(refFrame))\\n to3.setValue(from3.getValueAt(refFrame))\\n to4.setValue(from4.getValueAt(refFrame))\\nif output.getValue() == 1:\\n from1.setValue(to1.getValueAt(refFrame))\\n from2.setValue(to2.getValueAt(refFrame))\\n from3.setValue(to3.getValueAt(refFrame))\\n from4.setValue(to4.getValueAt(refFrame))')\n \n setFrameBtn = nuke.PyScript_Knob('setFrame', 'Set Frame')\n setFrameBtn.setCommand('n = nuke.thisNode()\\nrefFrame = n.knob(\\\"refFrame\\\").getValue()\\noutput = n.knob(\\\"output\\\")\\nto1 = n.knob(\\\"to1\\\")\\nto2 = n.knob(\\\"to2\\\")\\nto3 = n.knob(\\\"to3\\\")\\nto4 = n.knob(\\\"to4\\\")\\nfrom1 = n.knob(\\\"from1\\\")\\nfrom2 = n.knob(\\\"from2\\\")\\nfrom3 = n.knob(\\\"from3\\\")\\nfrom4 = n.knob(\\\"from4\\\")\\nif output.getValue() == 0:\\n to1.setValue(from1.getValueAt(refFrame))\\n to2.setValue(from2.getValueAt(refFrame))\\n to3.setValue(from3.getValueAt(refFrame))\\n to4.setValue(from4.getValueAt(refFrame))\\nif output.getValue() == 1:\\n from1.setValue(to1.getValueAt(refFrame))\\n from2.setValue(to2.getValueAt(refFrame))\\n from3.setValue(to3.getValueAt(refFrame))\\n from4.setValue(to4.getValueAt(refFrame))')\n \n StabBtn = nuke.PyScript_Knob(\"stabilize\", \"<font color=lime>Stabilize\")\n StabBtn.setFlag(nuke.STARTLINE)\n StabBtn.setCommand('n = nuke.thisNode()\\nstab = n.knob(\"stabilize\")\\nmatch = n.knob(\"matchmove\")\\noutput = n.knob(\"output\")\\nrefFrame = n.knob(\"refFrame\").getValue()\\nif output.getValue() == 1:\\n stab.setLabel(\"<font color=lime>Stabilize\")\\n match.setLabel(\"<font color=salmon>Matchmove\")\\n to1 = n.knob(\"to1\")\\n to2 = n.knob(\"to2\")\\n to3 = n.knob(\"to3\")\\n to4 = n.knob(\"to4\")\\n from1 = n.knob(\"from1\")\\n from2 = n.knob(\"from2\")\\n from3 = n.knob(\"from3\")\\n from4 = n.knob(\"from4\")\\n from1.copyAnimations(to1.animations())\\n from2.copyAnimations(to2.animations())\\n from3.copyAnimations(to3.animations())\\n from4.copyAnimations(to4.animations())\\n to1.clearAnimated()\\n to2.clearAnimated()\\n to3.clearAnimated()\\n to4.clearAnimated()\\n to1.setValue(from1.getValueAt(refFrame))\\n to2.setValue(from2.getValueAt(refFrame))\\n to3.setValue(from3.getValueAt(refFrame))\\n to4.setValue(from4.getValueAt(refFrame))\\n output.setValue(0)')\n \n MatchBtn = nuke.PyScript_Knob(\"matchmove\", \"<font color=salmon>Matchmove\")\n MatchBtn.setCommand('n = nuke.thisNode()\\nstab = n.knob(\"stabilize\")\\nmatch = n.knob(\"matchmove\")\\noutput = n.knob(\"output\")\\nrefFrame = n.knob(\"refFrame\").getValue()\\nif output.getValue() == 0:\\n stab.setLabel(\"<font color=salmon>Stabilize\")\\n match.setLabel(\"<font color=lime>Matchmove\")\\n to1 = n.knob(\"to1\")\\n to2 = n.knob(\"to2\")\\n to3 = n.knob(\"to3\")\\n to4 = n.knob(\"to4\")\\n from1 = n.knob(\"from1\")\\n from2 = n.knob(\"from2\")\\n from3 = n.knob(\"from3\")\\n from4 = n.knob(\"from4\")\\n to1.copyAnimations(from1.animations())\\n to2.copyAnimations(from2.animations())\\n to3.copyAnimations(from3.animations())\\n to4.copyAnimations(from4.animations())\\n from1.clearAnimated()\\n from2.clearAnimated()\\n from3.clearAnimated()\\n from4.clearAnimated()\\n from1.setValue(to1.getValueAt(refFrame))\\n from2.setValue(to2.getValueAt(refFrame))\\n from3.setValue(to3.getValueAt(refFrame))\\n from4.setValue(to4.getValueAt(refFrame))\\n output.setValue(1)')\n\n pulldownStatus = nuke.Enumeration_Knob('output', 'Output', \['Stabilized', 'Matchmoved'])\n \n intFrame = nuke.Int_Knob(\"refFrame\", \"Ref Frame\")\n intFrame.setFlag(nuke.STARTLINE)\n cpn.addKnob(tab)\n \n cpn.addKnob(setCurrentFrameBtn)\n cpn.addKnob(intFrame)\n cpn.knob(\"refFrame\").setValue(refFrame)\n \n cpn.addKnob(setFrameBtn)\n \n cpn.addKnob(StabBtn)\n cpn.addKnob(MatchBtn)\n \n cpn.addKnob(pulldownStatus)\n cpn.knob('output').setVisible(False)\n \n cpnto1.setValue(cpnfrom1.getValueAt(refFrame))\n cpnto2.setValue(cpnfrom2.getValueAt(refFrame))\n cpnto3.setValue(cpnfrom3.getValueAt(refFrame))\n cpnto4.setValue(cpnfrom4.getValueAt(refFrame))\n \n cpn\['label'].setValue('rf: \[value refFrame] dist: \{\}'.format(dist))" +STARTLINE}
  28. addUserKnob {22 exportLinkedTrack l "<font color = violet>Export Linked CornerPin" -STARTLINE T "n = nuke.thisNode()\n\ncps = nuke.toNode(\"CornerPin2DBakedStabilize\")\nnName = str(n.name())\ncpsName = str(cps.name())\nrefFrame = int(n.knob(\"refFrame\").value())\ndist = n.knob(\"distance\").value()\n\ncpsfrom1 = cps.knob(\"from1\")\ncpsfrom2 = cps.knob(\"from2\")\ncpsfrom3 = cps.knob(\"from3\")\ncpsfrom4 = cps.knob(\"from4\")\n\nwith nuke.Root():\n posX = n.knob(\"xpos\").value()\n posY = n.knob(\"ypos\").value()\n cpn = nuke.createNode('CornerPin2D')\n cpn.setName(nName + \"_Tracker\")\n cpn.knob('xpos').setValue(posX +100)\n cpn.knob('ypos').setValue(posY +70)\n cpn.autoplace()\n cpn.setInput(0, None)\n \n cpnto1 = cpn.knob('to1')\n cpnto2 = cpn.knob('to2')\n cpnto3 = cpn.knob('to3')\n cpnto4 = cpn.knob('to4')\n \n cpnfrom1 = cpn.knob('from1')\n cpnfrom2 = cpn.knob('from2')\n cpnfrom3 = cpn.knob('from3')\n cpnfrom4 = cpn.knob('from4')\n \n cpnfrom1.setExpression(nName + \".\" + cpsName + \".\" + \"from1\")\n cpnfrom2.setExpression(nName + \".\" + cpsName + \".\" + \"from2\")\n cpnfrom3.setExpression(nName + \".\" + cpsName + \".\" + \"from3\")\n cpnfrom4.setExpression(nName + \".\" + cpsName + \".\" + \"from4\")\n \n tab = nuke.Tab_Knob('settings', 'Settings')\n \n setCurrentFrameBtn = nuke.PyScript_Knob(\"setCurrentFrame\", \"Set to Current Frame\")\n setCurrentFrameBtn.setCommand('n = nuke.thisNode()\\nrefFrame = n.knob(\"refFrame\")\\nrefFrame.setValue(nuke.frame())\\nrefFrame = refFrame.getValue()\\noutput = n.knob(\"output\")\\nto1 = n.knob(\"to1\")\\nto2 = n.knob(\"to2\")\\nto3 = n.knob(\"to3\")\\nto4 = n.knob(\"to4\")\\nfrom1 = n.knob(\"from1\")\\nfrom2 = n.knob(\"from2\")\\nfrom3 = n.knob(\"from3\")\\nfrom4 = n.knob(\"from4\")\\nif output.getValue() == 0:\\n to1.setValue(from1.getValueAt(refFrame))\\n to2.setValue(from2.getValueAt(refFrame))\\n to3.setValue(from3.getValueAt(refFrame))\\n to4.setValue(from4.getValueAt(refFrame))\\nif output.getValue() == 1:\\n from1.setValue(to1.getValueAt(refFrame))\\n from2.setValue(to2.getValueAt(refFrame))\\n from3.setValue(to3.getValueAt(refFrame))\\n from4.setValue(to4.getValueAt(refFrame))')\n \n setFrameBtn = nuke.PyScript_Knob('setFrame', 'Set Frame')\n setFrameBtn.setCommand('n = nuke.thisNode()\\nrefFrame = n.knob(\\\"refFrame\\\").getValue()\\noutput = n.knob(\\\"output\\\")\\nto1 = n.knob(\\\"to1\\\")\\nto2 = n.knob(\\\"to2\\\")\\nto3 = n.knob(\\\"to3\\\")\\nto4 = n.knob(\\\"to4\\\")\\nfrom1 = n.knob(\\\"from1\\\")\\nfrom2 = n.knob(\\\"from2\\\")\\nfrom3 = n.knob(\\\"from3\\\")\\nfrom4 = n.knob(\\\"from4\\\")\\nif output.getValue() == 0:\\n to1.setValue(from1.getValueAt(refFrame))\\n to2.setValue(from2.getValueAt(refFrame))\\n to3.setValue(from3.getValueAt(refFrame))\\n to4.setValue(from4.getValueAt(refFrame))\\nif output.getValue() == 1:\\n from1.setValue(to1.getValueAt(refFrame))\\n from2.setValue(to2.getValueAt(refFrame))\\n from3.setValue(to3.getValueAt(refFrame))\\n from4.setValue(to4.getValueAt(refFrame))')\n \n StabBtn = nuke.PyScript_Knob(\"stabilize\", \"<font color=lime>Stabilize\")\n StabBtn.setFlag(nuke.STARTLINE)\n StabBtn.setCommand('n = nuke.thisNode()\\nstab = n.knob(\"stabilize\")\\nmatch = n.knob(\"matchmove\")\\noutput = n.knob(\"output\")\\nrefFrame = n.knob(\"refFrame\").getValue()\\nif output.getValue() == 1:\\n stab.setLabel(\"<font color=lime>Stabilize\")\\n match.setLabel(\"<font color=salmon>Matchmove\")\\n to1 = n.knob(\"to1\")\\n to2 = n.knob(\"to2\")\\n to3 = n.knob(\"to3\")\\n to4 = n.knob(\"to4\")\\n from1 = n.knob(\"from1\")\\n from2 = n.knob(\"from2\")\\n from3 = n.knob(\"from3\")\\n from4 = n.knob(\"from4\")\\n from1.copyAnimations(to1.animations())\\n from2.copyAnimations(to2.animations())\\n from3.copyAnimations(to3.animations())\\n from4.copyAnimations(to4.animations())\\n to1.clearAnimated()\\n to2.clearAnimated()\\n to3.clearAnimated()\\n to4.clearAnimated()\\n to1.setValue(from1.getValueAt(refFrame))\\n to2.setValue(from2.getValueAt(refFrame))\\n to3.setValue(from3.getValueAt(refFrame))\\n to4.setValue(from4.getValueAt(refFrame))\\n output.setValue(0)')\n \n MatchBtn = nuke.PyScript_Knob(\"matchmove\", \"<font color=salmon>Matchmove\")\n MatchBtn.setCommand('n = nuke.thisNode()\\nstab = n.knob(\"stabilize\")\\nmatch = n.knob(\"matchmove\")\\noutput = n.knob(\"output\")\\nrefFrame = n.knob(\"refFrame\").getValue()\\nif output.getValue() == 0:\\n stab.setLabel(\"<font color=salmon>Stabilize\")\\n match.setLabel(\"<font color=lime>Matchmove\")\\n to1 = n.knob(\"to1\")\\n to2 = n.knob(\"to2\")\\n to3 = n.knob(\"to3\")\\n to4 = n.knob(\"to4\")\\n from1 = n.knob(\"from1\")\\n from2 = n.knob(\"from2\")\\n from3 = n.knob(\"from3\")\\n from4 = n.knob(\"from4\")\\n to1.copyAnimations(from1.animations())\\n to2.copyAnimations(from2.animations())\\n to3.copyAnimations(from3.animations())\\n to4.copyAnimations(from4.animations())\\n from1.clearAnimated()\\n from2.clearAnimated()\\n from3.clearAnimated()\\n from4.clearAnimated()\\n from1.setValue(to1.getValueAt(refFrame))\\n from2.setValue(to2.getValueAt(refFrame))\\n from3.setValue(to3.getValueAt(refFrame))\\n from4.setValue(to4.getValueAt(refFrame))\\n output.setValue(1)')\n\n pulldownStatus = nuke.Enumeration_Knob('output', 'Output', \['Stabilized', 'Matchmoved'])\n \n intFrame = nuke.Int_Knob(\"refFrame\", \"Ref Frame\")\n intFrame.setFlag(nuke.STARTLINE)\n cpn.addKnob(tab)\n \n cpn.addKnob(setCurrentFrameBtn)\n cpn.addKnob(intFrame)\n cpn.knob(\"refFrame\").setValue(refFrame)\n \n cpn.addKnob(setFrameBtn)\n \n cpn.addKnob(StabBtn)\n cpn.addKnob(MatchBtn)\n \n cpn.addKnob(pulldownStatus)\n cpn.knob('output').setVisible(False)\n \n cpnto1.setValue(cpnfrom1.getValueAt(refFrame))\n cpnto2.setValue(cpnfrom2.getValueAt(refFrame))\n cpnto3.setValue(cpnfrom3.getValueAt(refFrame))\n cpnto4.setValue(cpnfrom4.getValueAt(refFrame))\n \n cpn\['label'].setValue('rf: \[value refFrame] dist: \{\}'.format(dist))"}
  29. addUserKnob {41 isOn +INVISIBLE T isON.isOn}
  30. addUserKnob {7 distanceAxis l DistanceToAxis +HIDDEN R 0 1000}
  31. distanceAxis {{AxisDistance.NoOp1.distance}}
  32. addUserKnob {26 overscanSettings l "<b><font color=skyblue>Overscan"}
  33. addUserKnob {7 overscan l Overscan R 0 200}
  34. overscan 200
  35. addUserKnob {26 mBlurSettings l "<b><font color=skyblue>MotionBlur"}
  36. addUserKnob {7 samples +HIDDEN R 1 10}
  37. samples 1
  38. addUserKnob {7 motionblur}
  39. addUserKnob {7 shutter R 0 2}
  40. shutter 0.5
  41. addUserKnob {41 shutteroffset l "shutter offset" T TimeBlur.shutteroffset}
  42. }
  43. BackdropNode {
  44. inputs 0
  45. name BackdropNode1
  46. tile_color 0x57614e00
  47. label Live
  48. note_font_size 60
  49. note_font_color 0xffffffff
  50. xpos 1893
  51. ypos 398
  52. bdwidth 301
  53. bdheight 350
  54. }
  55. BackdropNode {
  56. inputs 0
  57. name BackdropNode2
  58. tile_color 0x3c472700
  59. label Baked
  60. note_font_size 60
  61. note_font_color 0xffffffff
  62. xpos 2354
  63. ypos 382
  64. bdwidth 300
  65. bdheight 358
  66. }
  67. BackdropNode {
  68. inputs 0
  69. name BackdropNode3
  70. tile_color 0x5e443cff
  71. label Card3D
  72. note_font_size 100
  73. note_font_color 0xffffffff
  74. xpos 1129
  75. ypos -908
  76. bdwidth 400
  77. bdheight 1690
  78. }
  79. BackdropNode {
  80. inputs 0
  81. name BackdropNode4
  82. tile_color 0x686b5900
  83. label "Projection 3D setup"
  84. note_font_size 60
  85. note_font_color 0xffffffff
  86. xpos -13
  87. ypos -827
  88. bdwidth 735
  89. bdheight 1748
  90. }
  91. BackdropNode {
  92. inputs 0
  93. name BackdropNode5
  94. tile_color 0x44573100
  95. label "Corners of Cards \nfor Reconcile 3D"
  96. note_font_size 60
  97. note_font_color 0xffffffff
  98. xpos 1771
  99. ypos -1109
  100. bdwidth 763
  101. bdheight 1355
  102. }
  103. BackdropNode {
  104. inputs 0
  105. name BackdropNode6
  106. tile_color 0x555f6b00
  107. label "input cam"
  108. note_font_size 60
  109. note_font_color 0xffffffff
  110. xpos 929
  111. ypos -1247
  112. bdwidth 267
  113. bdheight 232
  114. }
  115. BackdropNode {
  116. inputs 0
  117. name BackdropNode8
  118. tile_color 0x4b5a2e00
  119. label Camera
  120. note_font_size 60
  121. note_font_color 0xffffffff
  122. xpos -638
  123. ypos -401
  124. bdwidth 442
  125. bdheight 1189
  126. }
  127. Input {
  128. inputs 0
  129. name Inputcam
  130. xpos -598
  131. ypos -300
  132. number 1
  133. }
  134. set Nb50bec00 [stack 0]
  135. Camera {
  136. projection_mode {{"\[value the_cam]projection_mode"}}
  137. focal {{"\[value \[value the_cam]focal]"}}
  138. haperture {{"\[value \[value the_cam]haperture]"}}
  139. vaperture {{"\[value \[value the_cam]vaperture]"}}
  140. near {{"\[value \[value the_cam]near]"}}
  141. far {{"\[value \[value the_cam]far]"}}
  142. win_translate {{"\[lindex \[value \[value the_cam]win_translate] 0]"} {"\[lindex \[value \[value the_cam]win_translate] 1]"}}
  143. win_scale {{"\[lindex \[value \[value the_cam]win_scale] 0]"} {"\[lindex \[value \[value the_cam]win_scale] 1]"}}
  144. winroll {{"\[value \[value the_cam]winroll]"}}
  145. focal_point {{"\[value \[value the_cam]focal_point]"}}
  146. fstop {{"\[value \[value the_cam]fstop]"}}
  147. name DummyCam
  148. help "DummyCam by Adrian Pueyo\n\nCamera that apart from the matrices also grabs all the \"Projection\" values from the upstream camera that it's connected to. Turns into a default Camera if not Camera connected.\n\nCan also be used inside of groups and gizmos, as many levels deep as you want :D\n\nAll using live and super fast TCL.\n\nadrianpueyo.com, 2019"
  149. onCreate "n = nuke.thisNode()\nfor k in \[\"projection_mode\",\"focal\",\"haperture\",\"vaperture\",\"near\",\"far\",\"win_translate\",\"win_scale\",\"winroll\",\"focal_point\",\"fstop\"]:\n n\[k].setFlag(0x0000000010000000)"
  150. xpos 969
  151. ypos -1133
  152. addUserKnob {20 DummyCam l Defaults}
  153. addUserKnob {43 the_cam +INVISIBLE}
  154. the_cam "\[\nset the_knob \"focal\"\nset knob_index 0\nset starting_point \"this.input0\"\nset default \"this\"\nset default \[append default \".d_\"]\n\n# If cam has no inputs, return the default...\nif \{\[exists \$starting_point]\} \{\n set x \[node \$starting_point]\n\} \{ \n return \$default\n\}\n\nset finished 0\nwhile \{\$finished != 1\} \{\n\n # First look for a Cam or Input or topnode.\n while \{\[class \$x] != \"Camera2\" && \[class \$x] != \"Camera\" && \[class \$x] != \"Input\" && \$x != \[topnode \$x]\} \{\n set x \[node \$x.input0]\n \}\n\n # Then, check if node is a cam (and return), and otherwise, if it's an input, see if the parent exists and move to it.\n if \{\[class \$x]==\"Camera2\"||\[class \$x]==\"Camera\"\} \{\n set x \[append x \".\"]\n return \$x\n \} \{ \n if \{\[class \$x]==\"Input\"\} \{ \n set inp \"\$x.parent.input\"\n set inputNum \[value \$x.number]\n set inp \[append inp \$inputNum]\n if \{\[exists \$inp]\} \{\n set x \[node \$inp]\n \} \{ \n set finished 1\n \}\n \} \{ \n set finished 1\n \}\n \}\n\}\nreturn \$default\n]"
  155. addUserKnob {4 d_projection_mode l projection M {perspective orthographic uv spherical ""}}
  156. addUserKnob {7 d_focal l focal R 0 100}
  157. d_focal 60
  158. addUserKnob {7 d_haperture l "horiz aperture" R 0 50}
  159. d_haperture 24.576
  160. addUserKnob {7 d_vaperture l "vert aperture" R 0 50}
  161. d_vaperture 18.672
  162. addUserKnob {7 d_near l near R 0 10}
  163. d_near 0.1
  164. addUserKnob {7 d_far l far R 0 10000}
  165. d_far 10000
  166. addUserKnob {12 d_win_translate l "window translate"}
  167. addUserKnob {12 d_win_scale l "window scale"}
  168. d_win_scale {1 1}
  169. addUserKnob {7 d_winroll l "window roll" R 0 45}
  170. addUserKnob {7 d_focal_point l "focal distance" R 0 10}
  171. d_focal_point 2
  172. addUserKnob {7 d_fstop l fstop R 0 30}
  173. d_fstop 16
  174. addUserKnob {26 text l " " T "<span style=\"color:#666\"><br/><b>DummyCam v1.0</b> - <a href=\"http://www.adrianpueyo.com\" style=\"color:#666;text-decoration: none;\">adrianpueyo.com</a>, 2019</span>"}
  175. }
  176. Dot {
  177. name Dot27
  178. note_font_size 41
  179. xpos 993
  180. ypos -974
  181. }
  182. set Nb50be000 [stack 0]
  183. Dot {
  184. name Dot23
  185. label cam
  186. note_font_size 41
  187. xpos 1317
  188. ypos -974
  189. }
  190. Axis2 {
  191. translate {0 0 {-parent.Settings.camDistance}}
  192. name CameraDistance
  193. label "dist to cam : \[value translate.z]"
  194. xpos 1293
  195. ypos -665
  196. }
  197. Axis2 {
  198. uniform_scale {{(DummyCam.haperture/DummyCam.focal)*Settings.camDistance}}
  199. name ScaleToFilmGateAxis
  200. label "uniform Scale : \[value uniform_scale]"
  201. xpos 1293
  202. ypos -539
  203. }
  204. set Nb50bd000 [stack 0]
  205. Axis2 {
  206. scaling {1 {DummyCam.vaperture/parent.DummyCam.haperture} 1}
  207. name AspectRatioScaleY
  208. label "scale Y : \[value scaling.y]"
  209. xpos 2131
  210. ypos -539
  211. }
  212. Dot {
  213. name Dot1
  214. note_font_size 41
  215. xpos 2155
  216. ypos -419
  217. }
  218. set Nb3d77c00 [stack 0]
  219. Card2 {
  220. inputs 0
  221. image_aspect false
  222. rows 4
  223. columns 4
  224. control_points {3 3 3 6
  225.  
  226. 1 {-0.5 -0.5 0} 0 {0.1666666865 0 0} 0 {0 0 0} 0 {0 0.1666666865 0} 0 {0 0 0} 0 {0 0 0}
  227. 1 {0 -0.5 0} 0 {0.1666666716 0 0} 0 {-0.1666666716 0 0} 0 {0 0.1666666865 0} 0 {0 0 0} 0 {0.5 0 0}
  228. 1 {0.5 -0.5 0} 0 {0 0 0} 0 {-0.1666666865 0 0} 0 {0 0.1666666865 0} 0 {0 0 0} 0 {1 0 0}
  229. 1 {-0.5 0 0} 0 {0.1666666865 0 0} 0 {0 0 0} 0 {0 0.1666666716 0} 0 {0 -0.1666666716 0} 0 {0 0.5 0}
  230. 1 {0 0 0} 0 {0.1666666716 0 0} 0 {-0.1666666716 0 0} 0 {0 0.1666666716 0} 0 {0 -0.1666666716 0} 0 {0.5 0.5 0}
  231. 1 {0.5 0 0} 0 {0 0 0} 0 {-0.1666666865 0 0} 0 {0 0.1666666716 0} 0 {0 -0.1666666716 0} 0 {1 0.5 0}
  232. 1 {-0.5 0.5 0} 0 {0.1666666865 0 0} 0 {0 0 0} 0 {0 0 0} 0 {0 -0.1666666865 0} 0 {0 1 0}
  233. 1 {0 0.5 0} 0 {0.1666666716 0 0} 0 {-0.1666666716 0 0} 0 {0 0 0} 0 {0 -0.1666666865 0} 0 {0.5 1 0}
  234. 1 {0.5 0.5 0} 0 {0 0 0} 0 {-0.1666666865 0 0} 0 {0 0 0} 0 {0 -0.1666666865 0} 0 {1 1 0} }
  235. name ProjectionPlane
  236. xpos 442
  237. ypos -505
  238. }
  239. TransformGeo {
  240. inputs 2
  241. name AlignProjectionPlane1
  242. xpos 442
  243. ypos -422
  244. }
  245. FrameHold {
  246. first_frame {{parent.refFrame}}
  247. name FrameHold1
  248. xpos 442
  249. ypos -345
  250. }
  251. Dot {
  252. name Dot10
  253. note_font_size 41
  254. xpos 476
  255. ypos -62
  256. }
  257. set Nb3d77000 [stack 0]
  258. Dot {
  259. name Dot16
  260. note_font_size 41
  261. xpos 296
  262. ypos -62
  263. }
  264. Dot {
  265. name Dot15
  266. note_font_size 41
  267. xpos 296
  268. ypos 1345
  269. }
  270. Input {
  271. inputs 0
  272. name Inputimg
  273. xpos 849
  274. ypos 174
  275. }
  276. Reformat {
  277. format {{{parent.input0.format}}}
  278. pbb true
  279. name Reformat1
  280. xpos 849
  281. ypos 250
  282. }
  283. Dot {
  284. name Dot12
  285. label img
  286. note_font_size 41
  287. xpos 883
  288. ypos 333
  289. }
  290. set Nb3d75800 [stack 0]
  291. Dot {
  292. name Dot7
  293. label img
  294. note_font_size 41
  295. xpos 1686
  296. ypos 333
  297. }
  298. set Nb3d75400 [stack 0]
  299. Dot {
  300. name Dot14
  301. note_font_size 41
  302. xpos 1967
  303. ypos 334
  304. }
  305. set Nb3d75000 [stack 0]
  306. Dot {
  307. name Dot6
  308. label img
  309. note_font_size 41
  310. xpos 2428
  311. ypos 334
  312. }
  313. Dot {
  314. name Dot25
  315. note_font_size 41
  316. xpos 2428
  317. ypos 482
  318. }
  319. set Nb3d74800 [stack 0]
  320. CornerPin2D {
  321. to1 {{curve x1001 -5.54865037e-05 -25.63124847 -56.08604431 -71.30036163 -83.46737671 -107.9873047 -141.9923706 -175.8965149 -198.5614319 -212.4110565 -229.5443268 -260.1188354 -296.4772339 -323.2683105 -350.8457336 -391.8320313 -427.5226135 -460.9609375 -487.8473206 -516.809082 -550.3614502 -574.2913208 -580.7318115 -573.619812 -568.5501709 -577.6804199 -593.4160767 -599.3457031 -606.0302734 -621.1759033} {curve x1001 -106.6666183 -111.7852936 -132.903595 -160.347229 -179.4461365 -193.0858459 -203.8371429 -217.9276123 -236.0983124 -252.4960938 -263.7530212 -279.315155 -308.9803162 -344.8827515 -375.7203369 -407.5403442 -425.8114014 -446.0387878 -470.0732422 -490.6462708 -517.3140869 -547.6869507 -568.3490601 -572.6419678 -558.5553589 -544.7201538 -547.7642822 -551.5206299 -549.9306641 -550.4000854}}
  322. to2 {{curve x1001 2048.000244 2041.854004 2038.14624 2049.502441 2058.58667 2053.650879 2040.704346 2031.078613 2032.462646 2039.262817 2040.22876 2031.775635 2024.435669 2025.660522 2020.821533 2006.330078 1995.567749 1987.827759 1983.789917 1976.824707 1971.432373 1976.448975 1990.057007 2004.999023 2011.498901 2009.25647 2008.615845 2012.878418 2011.836304 2003.605591} {curve x1001 -106.6665649 -113.2116241 -133.1286011 -158.5374908 -173.308197 -181.1758728 -191.9871674 -208.716507 -226.6538544 -237.8359985 -241.6056519 -246.1370392 -261.7627563 -278.9586792 -285.3890381 -292.7220764 -304.7340698 -316.7809448 -322.90271 -325.5470886 -337.2212219 -358.5812073 -376.5253906 -379.7476501 -372.2770081 -366.6139832 -373.3731384 -380.3668823 -381.1942139 -377.1599426}}
  323. to3 {{curve x1001 2048 2045.85022 2040.311523 2044.075073 2047.341064 2040.486206 2030.7229 2024.20874 2023.778076 2025.764648 2023.633545 2012.390381 1997.47229 1985.749878 1969.335571 1945.522095 1934.691284 1925.785645 1914.758057 1902.690918 1892.562256 1891.155151 1899.316772 1911.016235 1922.891724 1930.193726 1933.19165 1938.345337 1940.33667 1934.338135} {curve x1001 1258.666626 1262.909058 1253.782349 1241.921265 1239.612061 1240.375244 1236.341431 1227.352295 1219.145752 1218.131714 1222.436035 1223.530762 1213.466187 1202.515503 1199.346924 1192.93103 1184.356079 1176.632202 1173.952881 1173.917969 1166.405273 1152.32605 1142.969116 1146.701172 1158.908203 1168.207031 1165.588135 1162.850952 1164.080688 1167.479126}}
  324. to4 {{curve x1001 5.548650006e-05 -23.85838318 -48.07077408 -57.92486954 -69.96033478 -94.61101532 -122.5526962 -146.5423584 -161.789032 -174.4862213 -193.2120667 -223.4976349 -254.4747925 -278.5124817 -310.2148132 -350.7119141 -376.5684204 -401.5693054 -427.8048096 -457.161377 -483.9329224 -495.4501648 -493.0796814 -487.3604736 -485.4984131 -492.56073 -499.0982361 -498.6359558 -502.7892761 -518.0533447} {curve x1001 1258.666626 1270.175171 1268.425171 1254.435425 1247.434204 1249.898438 1258.049194 1263.644531 1261.701538 1258.83252 1262.259644 1267.574097 1261.832275 1246.817261 1237.488525 1232.030884 1235.847534 1238.282349 1235.361938 1236.865112 1235.203369 1225.286133 1216.171387 1215.87146 1232.246094 1255.069946 1264.222412 1266.866821 1273.8396 1283.052246}}
  325. invert false
  326. motionblur {{parent.motionblur}}
  327. shutter {{parent.shutter}}
  328. shutteroffset {{parent.shutteroffset}}
  329. from1 {{to1(refFrame)} {to1(refFrame)}}
  330. from2 {{to2(refFrame)} {to2(refFrame)}}
  331. from3 {{to3(refFrame)} {to3(refFrame)}}
  332. from4 {{to4(refFrame)} {to4(refFrame)}}
  333. name CornerPin2DBakedMatchmove
  334. xpos 2535
  335. ypos 573
  336. addUserKnob {20 User}
  337. addUserKnob {22 "set reference frame" -STARTLINE T "import addOnCreateUU; addOnCreateUU.cornerPinZero()"}
  338. }
  339. push $Nb3d74800
  340. CornerPin2D {
  341. to1 {{from1(refFrame)} {from1(refFrame)}}
  342. to2 {{from2(refFrame)} {from2(refFrame)}}
  343. to3 {{from3(refFrame)} {from3(refFrame)}}
  344. to4 {{from4(refFrame)} {from4(refFrame)}}
  345. invert false
  346. motionblur {{parent.motionblur}}
  347. shutter {{parent.shutter}}
  348. shutteroffset {{parent.shutteroffset}}
  349. from1 {{curve x1001 -5.54865037e-05 -25.63124847 -56.08604431 -71.30036163 -83.46737671 -107.9873047 -141.9923706 -175.8965149 -198.5614319 -212.4110565 -229.5443268 -260.1188354 -296.4772339 -323.2683105 -350.8457336 -391.8320313 -427.5226135 -460.9609375 -487.8473206 -516.809082 -550.3614502 -574.2913208 -580.7318115 -573.619812 -568.5501709 -577.6804199 -593.4160767 -599.3457031 -606.0302734 -621.1759033} {curve x1001 -106.6666183 -111.7852936 -132.903595 -160.347229 -179.4461365 -193.0858459 -203.8371429 -217.9276123 -236.0983124 -252.4960938 -263.7530212 -279.315155 -308.9803162 -344.8827515 -375.7203369 -407.5403442 -425.8114014 -446.0387878 -470.0732422 -490.6462708 -517.3140869 -547.6869507 -568.3490601 -572.6419678 -558.5553589 -544.7201538 -547.7642822 -551.5206299 -549.9306641 -550.4000854}}
  350. from2 {{curve x1001 2048.000244 2041.854004 2038.14624 2049.502441 2058.58667 2053.650879 2040.704346 2031.078613 2032.462646 2039.262817 2040.22876 2031.775635 2024.435669 2025.660522 2020.821533 2006.330078 1995.567749 1987.827759 1983.789917 1976.824707 1971.432373 1976.448975 1990.057007 2004.999023 2011.498901 2009.25647 2008.615845 2012.878418 2011.836304 2003.605591} {curve x1001 -106.6665649 -113.2116241 -133.1286011 -158.5374908 -173.308197 -181.1758728 -191.9871674 -208.716507 -226.6538544 -237.8359985 -241.6056519 -246.1370392 -261.7627563 -278.9586792 -285.3890381 -292.7220764 -304.7340698 -316.7809448 -322.90271 -325.5470886 -337.2212219 -358.5812073 -376.5253906 -379.7476501 -372.2770081 -366.6139832 -373.3731384 -380.3668823 -381.1942139 -377.1599426}}
  351. from3 {{curve x1001 2048 2045.85022 2040.311523 2044.075073 2047.341064 2040.486206 2030.7229 2024.20874 2023.778076 2025.764648 2023.633545 2012.390381 1997.47229 1985.749878 1969.335571 1945.522095 1934.691284 1925.785645 1914.758057 1902.690918 1892.562256 1891.155151 1899.316772 1911.016235 1922.891724 1930.193726 1933.19165 1938.345337 1940.33667 1934.338135} {curve x1001 1258.666626 1262.909058 1253.782349 1241.921265 1239.612061 1240.375244 1236.341431 1227.352295 1219.145752 1218.131714 1222.436035 1223.530762 1213.466187 1202.515503 1199.346924 1192.93103 1184.356079 1176.632202 1173.952881 1173.917969 1166.405273 1152.32605 1142.969116 1146.701172 1158.908203 1168.207031 1165.588135 1162.850952 1164.080688 1167.479126}}
  352. from4 {{curve x1001 5.548650006e-05 -23.85838318 -48.07077408 -57.92486954 -69.96033478 -94.61101532 -122.5526962 -146.5423584 -161.789032 -174.4862213 -193.2120667 -223.4976349 -254.4747925 -278.5124817 -310.2148132 -350.7119141 -376.5684204 -401.5693054 -427.8048096 -457.161377 -483.9329224 -495.4501648 -493.0796814 -487.3604736 -485.4984131 -492.56073 -499.0982361 -498.6359558 -502.7892761 -518.0533447} {curve x1001 1258.666626 1270.175171 1268.425171 1254.435425 1247.434204 1249.898438 1258.049194 1263.644531 1261.701538 1258.83252 1262.259644 1267.574097 1261.832275 1246.817261 1237.488525 1232.030884 1235.847534 1238.282349 1235.361938 1236.865112 1235.203369 1225.286133 1216.171387 1215.87146 1232.246094 1255.069946 1264.222412 1266.866821 1273.8396 1283.052246}}
  353. name CornerPin2DBakedStabilize
  354. xpos 2394
  355. ypos 573
  356. addUserKnob {20 User}
  357. addUserKnob {22 "set reference frame" -STARTLINE T "import addOnCreateUU; addOnCreateUU.cornerPinZero()"}
  358. }
  359. Switch {
  360. inputs 2
  361. which {{output}}
  362. name Switch7
  363. xpos 2394
  364. ypos 650
  365. }
  366. Dot {
  367. name Dot22
  368. note_font_size 41
  369. xpos 2428
  370. ypos 1281
  371. }
  372. push $Nb3d75000
  373. Dot {
  374. name Dot26
  375. note_font_size 41
  376. xpos 1967
  377. ypos 498
  378. }
  379. set Nb2c22800 [stack 0]
  380. CornerPin2D {
  381. to1 {{parent.Reconcile3DBL.output} {parent.Reconcile3DBL.output}}
  382. to2 {{parent.Reconcile3DBR.output} {parent.Reconcile3DBR.output}}
  383. to3 {{parent.Reconcile3DTR.output} {parent.Reconcile3DTR.output}}
  384. to4 {{parent.Reconcile3DTL.output} {parent.Reconcile3DTL.output}}
  385. invert false
  386. motionblur {{parent.motionblur}}
  387. shutter {{parent.shutter}}
  388. shutteroffset {{parent.shutteroffset}}
  389. from1 {{to1(refFrame)} {to1(refFrame)}}
  390. from2 {{to2(refFrame)} {to2(refFrame)}}
  391. from3 {{to3(refFrame)} {to3(refFrame)}}
  392. from4 {{to4(refFrame)} {to4(refFrame)}}
  393. name CornerPin2DLiveMatchmove
  394. xpos 2074
  395. ypos 582
  396. addUserKnob {20 User}
  397. addUserKnob {22 "set reference frame" -STARTLINE T "import addOnCreateUU; addOnCreateUU.cornerPinZero()"}
  398. }
  399. push $Nb2c22800
  400. CornerPin2D {
  401. to1 {{parent.Reconcile3DBL.output(refFrame)} {parent.Reconcile3DBL.output(refFrame)}}
  402. to2 {{parent.Reconcile3DBR.output(refFrame)} {parent.Reconcile3DBR.output(refFrame)}}
  403. to3 {{parent.Reconcile3DTR.output(refFrame)} {parent.Reconcile3DTR.output(refFrame)}}
  404. to4 {{parent.Reconcile3DTL.output(refFrame)} {parent.Reconcile3DTL.output(refFrame)}}
  405. invert false
  406. motionblur {{parent.motionblur}}
  407. shutter {{parent.shutter}}
  408. shutteroffset {{parent.shutteroffset}}
  409. from1 {{parent.Reconcile3DBL.output} {parent.Reconcile3DBL.output}}
  410. from2 {{parent.Reconcile3DBR.output} {parent.Reconcile3DBR.output}}
  411. from3 {{parent.Reconcile3DTR.output} {parent.Reconcile3DTR.output}}
  412. from4 {{parent.Reconcile3DTL.output} {parent.Reconcile3DTL.output}}
  413. name CornerPin2DLiveStabilize
  414. xpos 1933
  415. ypos 583
  416. addUserKnob {20 User}
  417. addUserKnob {22 "set reference frame" -STARTLINE T "import addOnCreateUU; addOnCreateUU.cornerPinZero()"}
  418. }
  419. Switch {
  420. inputs 2
  421. which {{output}}
  422. name Switch5
  423. xpos 1933
  424. ypos 644
  425. }
  426. Dot {
  427. name Dot3
  428. note_font_size 41
  429. xpos 1967
  430. ypos 785
  431. }
  432. push $Nb50bd000
  433. Dot {
  434. name Dot19
  435. note_font_size 41
  436. xpos 1317
  437. ypos -361
  438. }
  439. set Nb2c20c00 [stack 0]
  440. push $Nb2c20c00
  441. FrameHold {
  442. first_frame {{parent.refFrame}}
  443. name FrameHold4
  444. xpos 1418
  445. ypos -293
  446. }
  447. Switch {
  448. inputs 2
  449. which {{!output}}
  450. name Switch6
  451. label "\[value which]"
  452. xpos 1283
  453. ypos -224
  454. }
  455. push $Nb50bec00
  456. Dot {
  457. name Dot18
  458. note_font_size 41
  459. xpos -564
  460. ypos -54
  461. }
  462. set Nb2c20400 [stack 0]
  463. Dot {
  464. name Dot4
  465. note_font_size 41
  466. xpos -564
  467. ypos 271
  468. }
  469. set Nb848fc00 [stack 0]
  470. FrameHold {
  471. first_frame {{parent.refFrame}}
  472. name FrameHold2
  473. xpos -454
  474. ypos 264
  475. }
  476. set Nf6f7cf00 [stack 0]
  477. Dot {
  478. name Dot13
  479. note_font_size 41
  480. xpos -420
  481. ypos 536
  482. }
  483. push $Nb848fc00
  484. Dot {
  485. name Dot11
  486. note_font_size 41
  487. xpos -564
  488. ypos 442
  489. }
  490. set Nb848f400 [stack 0]
  491. Switch {
  492. inputs 2
  493. which {{!output}}
  494. name Switch3
  495. label "\[value which]"
  496. xpos -598
  497. ypos 529
  498. }
  499. Dot {
  500. name Dot8
  501. note_font_size 41
  502. xpos -564
  503. ypos 629
  504. }
  505. set Nb848ec00 [stack 0]
  506. push $Nb3d75800
  507. Card3D {
  508. inputs 3
  509. translate {0 0 0}
  510. format {{{parent.Reformat1.format}}}
  511. shutter {{parent.shutter}}
  512. shutteroffset {{parent.shutteroffset}}
  513. name Card3D1
  514. xpos 1283
  515. ypos 625
  516. }
  517. Dot {
  518. name Dot9
  519. note_font_size 41
  520. xpos 1317
  521. ypos 725
  522. }
  523. push $Nb848ec00
  524. Dot {
  525. name Dot5
  526. note_font_size 41
  527. xpos -564
  528. ypos 736
  529. }
  530. push $Nf6f7cf00
  531. Dot {
  532. name Dot24
  533. note_font_size 41
  534. xpos -282
  535. ypos 271
  536. }
  537. push $Nb848f400
  538. Switch {
  539. inputs 2
  540. which {{output}}
  541. name Switch2
  542. label "\[value which]"
  543. xpos -316
  544. ypos 435
  545. }
  546. push $Nb3d75800
  547. Dot {
  548. name Dot29
  549. label img
  550. note_font_size 41
  551. xpos 626
  552. ypos 333
  553. }
  554. Project3D2 {
  555. inputs 2
  556. crop false
  557. name Project3D1
  558. xpos 592
  559. ypos 432
  560. }
  561. Dot {
  562. name Dot2
  563. note_font_size 41
  564. xpos 626
  565. ypos 520
  566. }
  567. push $Nb3d77000
  568. ApplyMaterial {
  569. inputs 2
  570. name ApplyMaterial1
  571. xpos 442
  572. ypos 517
  573. }
  574. Reformat {
  575. inputs 0
  576. format {{{parent.input0.format}}}
  577. resize none
  578. pbb true
  579. name Reformat2
  580. xpos 591
  581. ypos 733
  582. }
  583. ScanlineRender {
  584. inputs 3
  585. conservative_shader_sampling false
  586. overscan {{parent.overscan}}
  587. motion_vectors_type off
  588. MB_channel none
  589. name ScanlineRender1
  590. xpos 442
  591. ypos 733
  592. }
  593. TimeBlur {
  594. divisions {{parent.samples}}
  595. shutter {{parent.shutter}}
  596. shutteroffset centred
  597. shuttercustomoffset 0
  598. name TimeBlur
  599. xpos 442
  600. ypos 833
  601. disable {{"divisions == 1 ? 1 : 0"}}
  602. }
  603. Switch {
  604. inputs 4
  605. which {{"result == 2 && !\$gui == 1 ? 0 : result"}}
  606. name Switch1
  607. xpos 442
  608. ypos 1277
  609. }
  610. Switch {
  611. inputs 2
  612. which 1
  613. name Switch4
  614. xpos 442
  615. ypos 1342
  616. disable true
  617. }
  618. Output {
  619. name Output1
  620. xpos 442
  621. ypos 1423
  622. }
  623. push $Nb3d77c00
  624. FrameHold {
  625. first_frame {{parent.refFrame}}
  626. name FrameHold3
  627. xpos 2121
  628. ypos -309
  629. }
  630. Dot {
  631. name Dot21
  632. note_font_size 41
  633. xpos 2155
  634. ypos -250
  635. }
  636. set Nb7d96400 [stack 0]
  637. Axis2 {
  638. translate {0.5 0.5 0}
  639. name TopRight
  640. xpos 2043
  641. ypos -178
  642. }
  643. set Nb7d96000 [stack 0]
  644. push $Nb50be000
  645. Dot {
  646. name Dot20
  647. label cam
  648. note_font_size 41
  649. xpos 993
  650. ypos 11
  651. }
  652. Dot {
  653. name Dot17
  654. label cam
  655. note_font_size 41
  656. xpos 1837
  657. ypos 11
  658. }
  659. set Nb7d95400 [stack 0]
  660. push $Nb3d75400
  661. Reconcile3D {
  662. inputs 3
  663. calc_output true
  664. output {1934.338135 1167.479126}
  665. outputxyz {0.488941133 0.397094816 -1.439435005}
  666. name Reconcile3DTR
  667. xpos 2033
  668. ypos 103
  669. }
  670. push $Nb7d96400
  671. Axis2 {
  672. translate {-0.5 -0.5 0}
  673. name BottomLeft
  674. xpos 2219
  675. ypos -178
  676. }
  677. set Nb7d94c00 [stack 0]
  678. push $Nb7d95400
  679. push $Nb3d75400
  680. Reconcile3D {
  681. inputs 3
  682. calc_output true
  683. output {-621.1759033 -550.4000854}
  684. outputxyz {-0.6424835324 -0.349278301 -1.364200354}
  685. name Reconcile3DBL
  686. xpos 2209
  687. ypos 99
  688. }
  689. push $Nb7d96400
  690. Axis2 {
  691. translate {0.5 -0.5 0}
  692. name BottomRight
  693. xpos 2358
  694. ypos -184
  695. }
  696. set Nb779bc00 [stack 0]
  697. push $Nb7d95400
  698. push $Nb3d75400
  699. Reconcile3D {
  700. inputs 3
  701. calc_output true
  702. output {2003.605591 -377.1599426}
  703. outputxyz {0.4838566184 -0.3558466733 -1.448682785}
  704. name Reconcile3DBR
  705. xpos 2348
  706. ypos 101
  707. }
  708. push $Nb7d96400
  709. Axis2 {
  710. translate {-0.5 0.5 0}
  711. name TopLeft
  712. xpos 1883
  713. ypos -180
  714. }
  715. set Nb779b000 [stack 0]
  716. push $Nb7d95400
  717. push $Nb3d75400
  718. Reconcile3D {
  719. inputs 3
  720. calc_output true
  721. output {-518.0533447 1283.052246}
  722. outputxyz {-0.6373990178 0.4036631882 -1.354952574}
  723. name Reconcile3DTL
  724. xpos 1873
  725. ypos 99
  726. }
  727. push $Nb3d77000
  728. push $Nb779bc00
  729. push $Nb7d94c00
  730. push $Nb7d96000
  731. push $Nb779b000
  732. Scene {
  733. inputs 5
  734. name SceneTest
  735. xpos 2124
  736. ypos -86
  737. }
  738. Input {
  739. inputs 0
  740. name InputAxis
  741. xpos -382
  742. ypos -301
  743. number 2
  744. }
  745. NoOp {
  746. name isON
  747. xpos -382
  748. ypos -248
  749. addUserKnob {20 User}
  750. addUserKnob {6 isOn +STARTLINE}
  751. isOn {{"\[exists input2]"}}
  752. }
  753. push $Nb2c20400
  754. Group {
  755. inputs 2
  756. name AxisDistance
  757. tile_color 0x9c0000ff
  758. xpos -382
  759. ypos -57
  760. addUserKnob {20 tab1 l TNT_AxisDistance}
  761. addUserKnob {41 distance T NoOp1.distance}
  762. }
  763. Output {
  764. inputs 0
  765. name Output1
  766. xpos 488
  767. ypos 194
  768. }
  769. Input {
  770. inputs 0
  771. name axis2
  772. xpos 740
  773. ypos -220
  774. number 1
  775. }
  776. Axis2 {
  777. name A2
  778. xpos 750
  779. ypos -150
  780. }
  781. NoOp {
  782. inputs 0
  783. name NoOp1
  784. xpos 620
  785. ypos -70
  786. addUserKnob {20 User}
  787. addUserKnob {7 distance R 0 100}
  788. distance {{sqrt((pow2(parent.A1.world_matrix.3-parent.A2.world_matrix.3))+(pow2(parent.A1.world_matrix.7-parent.A2.world_matrix.7))+(pow2(parent.A1.world_matrix.11-parent.A2.world_matrix.11)))}}
  789. }
  790. Input {
  791. inputs 0
  792. name axis1
  793. xpos 500
  794. ypos -220
  795. }
  796. Axis2 {
  797. name A1
  798. xpos 510
  799. ypos -150
  800. }
  801. end_group
  802. NoOp {
  803. name Settings
  804. xpos -382
  805. ypos 35
  806. addUserKnob {20 User}
  807. addUserKnob {7 camDistance l "Camera Distance" R 0 2000}
  808. camDistance {{"isOn == 0 ? parent.distance : AxisDistance.distance"}}
  809. }
  810. end_group
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement