Skip to content

Instantly share code, notes, and snippets.

@kpprt
Created March 26, 2018 11:16
Show Gist options
  • Save kpprt/c519a6c26a66b3dd5a78a324912976f5 to your computer and use it in GitHub Desktop.
Save kpprt/c519a6c26a66b3dd5a78a324912976f5 to your computer and use it in GitHub Desktop.
Transform with normalized UV values.
set cut_paste_input [stack 0]
version 10.5 v3
push $cut_paste_input
Group {
name CS_UVTransform1
tile_color 0xa57aaaff
addUserKnob {20 CS_UVTransform}
addUserKnob {41 uvPosition l "UV Position" T Transform1.uvPosition}
addUserKnob {41 uvSize l "UV Size" T Transform1.uvSize}
addUserKnob {41 uvCenter l "UV Center" T Transform1.uvCenter}
addUserKnob {26 Transform}
addUserKnob {41 invert_matrix l invert T Transform1.invert_matrix}
addUserKnob {41 filter T Transform1.filter}
addUserKnob {41 clamp -STARTLINE T Transform1.clamp}
addUserKnob {41 black_outside l "black outside" -STARTLINE T Transform1.black_outside}
addUserKnob {41 motionblur T Transform1.motionblur}
addUserKnob {41 shutter T Transform1.shutter}
addUserKnob {41 shutteroffset l "shutter offset" T Transform1.shutteroffset}
addUserKnob {41 shuttercustomoffset l "" -STARTLINE T Transform1.shuttercustomoffset}
}
Input {
inputs 0
name Input
xpos 510
ypos -418
}
Transform {
translate {{"uvPosition.u * width"} {"uvPosition.v * height"}}
scale {{uvSize.u} {uvSize.v}}
center {{"uvCenter.u * width"} {"uvCenter.v * height"}}
motionblur {0}
shutter {0.5}
shuttercustomoffset {0}
name Transform1
selected true
xpos 510
ypos -346
addUserKnob {20 uvTransform l "UV Transform"}
addUserKnob {30 uvPosition l "UV Position"}
uvPosition {0 0}
addUserKnob {30 uvSize l "UV Size"}
uvSize {1 1}
addUserKnob {30 uvCenter l "UV Center"}
uvCenter {0 0}
}
Output {
name Output1
xpos 510
ypos -274
}
end_group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment