Group {
inputs 2
tile_color 0xb20000ff
label "Ref Frame:\[value ref_frame]\nDistance:\[value plane_distance]\nType:\[value transform]"
addUserKnob {20 CameraPlane l Controls t "Settings for CameraPlane"}
addUserKnob {4 cameraList l "connect camera" M {----------------------------}}
addUserKnob {22 reloadCams l "Reload Camera List" -STARTLINE T "def getCameras():\n with nuke.root():\n myCameras = \[]\n \n ##For loop to grab all nodes in the class\n for i in nuke.allNodes():\n if i.Class() == \"Camera\" or i.Class() == \"Camera2\":\n myCameras.append(i.knob('name').getValue())\n \n myCameras.sort()\n return myCameras\n\n\nj = nuke.thisNode()\nk = j\['cameraList']\ncurrent = j\['cameraList'].value()\nwith nuke.root():\n k.setValues(getCameras())\nj\['cameraList'].setValue(current)"}
addUserKnob {22 connect l Connect -STARTLINE T "p = nuke.thisNode()\ncam = nuke.toNode(p\['cameraList'].value())\np.setInput(1, cam)"}
addUserKnob {41 format l "output format" T Reformat1.format}
addUserKnob {4 transform M {Match-Move Stabilize "" "" "" "" "" "" "" ""}}
addUserKnob {3 ref_frame l "reference frame"}
ref_frame 1001
addUserKnob {22 python_button l "current frame" -STARTLINE T "nuke.thisNode()\['ref_frame'].setValue(nuke.frame())"}
addUserKnob {7 plane_distance l "plane distance" R 0 1000}
plane_distance 100
addUserKnob {26 ""}
addUserKnob {41 overscan_px l "Overscan (px)" T Overscan_Crop.overscan_px}
addUserKnob {41 crop l "black outside" T Overscan_Crop.crop}
addUserKnob {26 ""}
addUserKnob {41 motionblur T Card3D.motionblur}
addUserKnob {41 shutter T Card3D.shutter}
addUserKnob {26 ""}
addUserKnob {26 author l "" +STARTLINE T "CameraPlane v1.0 - (c) 2022 - Chris McCrowe - www.chrismccrowe.com"}
}
Input {
inputs 0
name Camera
xpos -554
ypos -130
number 1
}
Dot {
name Dot1
xpos -526
ypos 6
}
set Nb152e800 [stack 0]
Camera2 {
inputs 0
translate {{"\[topnode parent.input1].translate.x(parent.ref_frame)"} {"\[topnode parent.input1].translate.y(parent.ref_frame)"} {"\[topnode parent.input1].translate.z(parent.ref_frame)"}}
rotate {{"\[topnode parent.input1].rotate.x(parent.ref_frame)"} {"\[topnode parent.input1].rotate.y(parent.ref_frame)"} {"\[topnode parent.input1].rotate.z(parent.ref_frame)"}}
focal {{"\[topnode parent.input1].focal(parent.transform==1?parent.ref_frame:frame)"}}
haperture {{"\[topnode parent.input1].haperture(parent.transform==1?parent.ref_frame:frame)" x1439 23.76000259 x1483 6.5}}
vaperture {{"\[topnode parent.input1].vaperture(parent.transform==1?parent.ref_frame:frame)"}}
near 4.4
focal_point 0
fstop 5.599999905
name renderCamera
selected true
xpos -777
ypos 109
addUserKnob {20 User}
addUserKnob {4 cameraList l "connect camera" M {"\[]"}}
}
Switch {
inputs 2
which {{!parent.transform}}
name Switch4
tile_color 0xff00ff
label "Stabilize or Match-move\n"
note_font "DejaVu Sans Bold"
xpos -554
ypos 123
addUserKnob {20 CM}
addUserKnob {3 changeColor l INVISIBLE +INVISIBLE}
changeColor {{"\[if \{\[value disable]==true\} \{\nknob tile_color 0x4c0d00ff\nbrake\}]\n\n\[if \{\[value which]<1\} then \{\nknob tile_color 0xff0000ff\n\} elseif \{\[value which]==1\} then \{\nknob tile_color 0xff00ff\n\} else \{\nknob tile_color 0xffff\}]\n\n\[value this.which]"}}
addUserKnob {26 info l "" +STARTLINE T "disable = dark red\n\n0 = red\n1 = green\n2 = blue\n"}
}
Input {
inputs 0
name Image
xpos -261
ypos -317
}
Card3D {
inputs 2
useMatrix true
matrix {
{{MatrixAxis.world_matrix.0(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.1(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.2(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.3(parent.transform==0?parent.ref_frame:frame)}}
{{MatrixAxis.world_matrix.4(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.5(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.6(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.7(parent.transform==0?parent.ref_frame:frame)}}
{{MatrixAxis.world_matrix.8(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.9(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.10(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.11(parent.transform==0?parent.ref_frame:frame)}}
{{MatrixAxis.world_matrix.12(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.13(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.14(parent.transform==0?parent.ref_frame:frame)} {MatrixAxis.world_matrix.15(parent.transform==0?parent.ref_frame:frame)}}
}
lens_in_focal {{"\[topnode parent.input1].focal(parent.transform==0?parent.ref_frame:frame)" x1073 0}}
lens_in_haperture {{"\[topnode parent.input1].haperture(parent.transform==0?parent.ref_frame:frame)"}}
format {{{parent.Reformat1.format}}}
motionblur 1
shutteroffset centred
name Card3D
xpos -261
ypos 129
}
set Nb152d800 [stack 0]
Group {
name Overscan_Crop
tile_color 0xbe81caff
xpos -261
ypos 334
addUserKnob {20 Controls}
addUserKnob {7 overscan_px l "Overscan (px)" R 0 100}
addUserKnob {26 ""}
addUserKnob {41 softness T Crop1.softness}
addUserKnob {41 reformat T Crop1.reformat}
addUserKnob {41 intersect -STARTLINE T Crop1.intersect}
addUserKnob {41 crop l "black outside" -STARTLINE T Crop1.crop}
addUserKnob {26 ""}
addUserKnob {26 _1 l "" +STARTLINE T "Overscan_Crop v1.0 - (c) 2023 - Chris McCrowe - www.chrismccrowe.com"}
}
Input {
inputs 0
name Input1
xpos -885
ypos -678
}
Crop {
box {{0-parent.overscan_px x1668366 128} {0-parent.overscan_px x1668366 -100} {"input.width + parent.overscan_px" x1668366 3940} {"input.height + parent.overscan_px" x1668366 2058}}
intersect true
name Crop1
selected true
xpos -885
ypos -610
}
Output {
name Output1
xpos -885
ypos -538
}
end_group
Output {
name Output1
xpos -261
ypos 744
}
Reformat {
inputs 0
name Reformat1
note_font "Bitstream Vera Sans"
xpos -106
ypos 128
}
push $Nb152e800
Axis2 {
translate {0 0 {-plane_distance}}
uniform_scale {{plane_distance}}
name MatrixAxis
note_font "Bitstream Vera Sans"
xpos -416
ypos -12
}
push $Nb152d800
Viewer {
frame_range 1100-1100
colour_sample_bbox {-1.595185995 -0.6187089682 -1.594091892 -0.6181619167}
name Viewer1
xpos -763
ypos 819
}
end_group