Skip to content

Instantly share code, notes, and snippets.

@kpprt
Created July 15, 2015 11:35
Show Gist options
  • Save kpprt/37a670678de278964504 to your computer and use it in GitHub Desktop.
Save kpprt/37a670678de278964504 to your computer and use it in GitHub Desktop.
Expression for Nuke to easily offset and repeat pixels at the edge of the image
set cut_paste_input [stack 0]
version 9.0 v5
push $cut_paste_input
Expression {
temp_name0 dx
temp_expr0 "(x - offset.x + width) % width"
temp_name1 dy
temp_expr1 "(y - offset.y + height) % height"
expr0 "r(dx, dy)"
expr1 "g(dx, dy)"
expr2 "b(dx, dy)"
expr3 "a(dx, dy)"
name CS_PixelOffsetExpression1
selected true
xpos 0
ypos 0
addUserKnob {20 PixelOffset}
addUserKnob {12 offset}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment