Skip to content

Instantly share code, notes, and snippets.

@kpprt
Last active October 8, 2018 15:27
Show Gist options
  • Save kpprt/27bf8d0b5f35a4fbdb6545c354927689 to your computer and use it in GitHub Desktop.
Save kpprt/27bf8d0b5f35a4fbdb6545c354927689 to your computer and use it in GitHub Desktop.
Create a straight line in Nuke from one position to another and define a width as well as rounded or square caps. Since it is realized internally with a Roto node it is also possible to render the line with Motion Blur.
set cut_paste_input [stack 0]
version 10.5 v7
push $cut_paste_input
Group {
name CS_Line1
addUserKnob {20 CS_Line}
addUserKnob {41 output T Roto1.output}
addUserKnob {41 cliptype l "clip to" T Roto1.cliptype}
addUserKnob {26 divider_shape l "@b;Shape"}
addUserKnob {41 color T Roto1.color}
addUserKnob {41 openspline_width l "overall width" T Roto1.openspline_width}
addUserKnob {12 from}
addUserKnob {41 openspline_start_end_type l "" -STARTLINE T Roto1.openspline_start_end_type}
addUserKnob {12 to}
to {100 100}
addUserKnob {41 openspline_last_end_type l "" -STARTLINE T Roto1.openspline_last_end_type}
addUserKnob {26 divider_motion_blur l "@b;Motion Blur"}
addUserKnob {41 motionblur T Roto1.motionblur}
addUserKnob {41 motionblur_on l on -STARTLINE T Roto1.motionblur_on}
addUserKnob {41 motionblur_shutter l shutter T Roto1.motionblur_shutter}
addUserKnob {41 motionblur_shutter_offset_type l "shutter offset" T Roto1.motionblur_shutter_offset_type}
addUserKnob {41 motionblur_shutter_offset l "" -STARTLINE T Roto1.motionblur_shutter_offset}
}
Input {
inputs 0
name Input
xpos -920
ypos 422
}
Roto {
cliptype none
curves {{{v x3f99999a}
{f 0}
{n
{layer Root
{f 2097664}
{t x44b40000 x444a8000}
{a pt1x 0 pt1y 0 pt2x 0 pt2y 0 pt3x 0 pt3y 0 pt4x 0 pt4y 0 ptex00 0 ptex01 0 ptex02 0 ptex03 0 ptex10 0 ptex11 0 ptex12 0 ptex13 0 ptex20 0 ptex21 0 ptex22 0 ptex23 0 ptex30 0 ptex31 0 ptex32 0 ptex33 0 ptof1x 0 ptof1y 0 ptof2x 0 ptof2y 0 ptof3x 0 ptof3y 0 ptof4x 0 ptof4y 0 pterr 0 ptrefset 0 ptmot x40800000 ptref 0}
{curvegroup OpenSpline1 1049088 bezier
{{cc
{f 1056800}
{p
{}
{{a osw 1 osf 0}
{=from.x x41c00000}
{=from.y x41600000}}
{}
{}
{{a osw 1 osf 0}
{=to.x x42920000}
{=to.y x42200000}}
{}}}
{cc
{f 1056800}
{p
{}
{}
{}
{}
{}
{}}}}
{t 0 0
{{x447a4000 0}} 0 0
{{x447a4000 0}}
{{x447a4000 0}}
{{x447a4000 0}} 0 1 1
{{x447a4000 1}} 0 0
{{x447a4000 0}}
{{x447a4000 0}}
{{x447a4000 0}}
{{x447a4000 0}}
{{x447a4000 0}}}
{a osbe 0 osee 0 osw 1 osf 0 str 1 ltn x447a4000 ltm x447a4000 tt x41200000}}}}}}
toolbox {selectAll {
{ selectAll str 1 ssx 1 ssy 1 sf 1 }
{ createBezier str 1 ssx 1 ssy 1 sf 1 sb 1 tt 4 }
{ createBezierCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ createBSpline str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ createEllipse str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ createRectangle str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ createRectangleCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ createOpenSpline str 1 ssx 1 ssy 1 sf 1 tt 10 }
{ brush str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ eraser src 2 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ clone src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ reveal src 3 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ dodge src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ burn src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ blur src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ sharpen src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
{ smear src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
toolbar_autokey false
toolbar_brush_hardness 0.200000003
toolbar_openspline_width 1
toolbar_source_transform_center {1440 810}
colorOverlay {0 0 0 0}
lifetime_type "all frames"
lifetime_start 1001
lifetime_end 1001
motionblur_shutter_offset_type centred
openspline_width 1
name Roto1
xpos -920
ypos 494
}
Output {
name Output
xpos -920
ypos 566
}
end_group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment