# Aberration v1.3
# By Jason Bidwell
# Updated 03-29-2016

Gizmo {
 name Aberration
 tile_color 0xff7b2cff
 selected true
 xpos 161
 ypos -96
 addUserKnob {20 aberration l "Chromatic Aberration"}
 addUserKnob {7 colorBalance l "Aberration Multiplier" R -1 1}
 colorBalance 0.1
 addUserKnob {7 blu l INVISIBLE +INVISIBLE}
 blu {{colorBalance+(grn*2)}}
 addUserKnob {26 ""}
 addUserKnob {7 grn l INVISIBLE +INVISIBLE}
 grn {{colorBalance R x1 -0}}
 addUserKnob {7 red l INVISIBLE +INVISIBLE}
 red {{-1*blu}}
 addUserKnob {20 Axial l "Axial Controls" n 1}
 addUserKnob {7 abbrRad l Radial R 0 5}
 abbrRad 0.25
 addUserKnob {7 abbrRot l Rotational R -10 10}
 abbrRot 0.25
 addUserKnob {20 endGroup n -1}
 addUserKnob {26 ""}
 addUserKnob {20 Transverse l "Transverse Controls" n 1}
 addUserKnob {7 abbrX l "Offset X" R -10 10}
 abbrX 1
 addUserKnob {7 abbrY l "Offset  Y" R -10 10}
 abbrY 1
 addUserKnob {7 abrTop l Top R -0.01 0.01}
 addUserKnob {7 abrBtm l Bottom R -0.01 0.01}
 addUserKnob {20 endGroup_1 l endGroup n -1}
 addUserKnob {26 ""}
 addUserKnob {20 channels_1 l "Channel Filters" n 1}
 addUserKnob {7 blend l Blend R 0 100}
 blend 70
 addUserKnob {7 soft l Soften R 0 100}
 soft 10
 addUserKnob {41 channels l INVISIBLE +INVISIBLE T channelSelectOffst.channels}
 addUserKnob {6 redBypass l "<font color=red> Red <font color=lightgrey> Bypass" t "Bypass red channel" +STARTLINE}
 addUserKnob {6 greenBypass l "<font color=green> Green <font color=lightgrey> Bypass" t "Bypass green channel" -STARTLINE}
 addUserKnob {6 blueBypass l "<font color=blue> Blue <font color=lightgrey> Bypass" t "Bypass blue channel" -STARTLINE}
 addUserKnob {20 endGroup_2 l endGroup n -1}
 addUserKnob {26 ""}
 addUserKnob {20 mask l "Mask Controls" n 1}
 addUserKnob {6 cntrMask l "Use Center Mask" +STARTLINE}
 cntrMask true
 addUserKnob {7 maskErode l Shape R -300 300}
 maskErode 40
 addUserKnob {7 maskSoft l Soften R 0 1000.3}
 maskSoft 265
 addUserKnob {7 scaleMask l Scale R 0.1 2}
 scaleMask 0.9
 addUserKnob {6 showMask l "Show Mask" +STARTLINE}
 addUserKnob {18 maskcolorrgb l "Mask Color"}
 maskcolorrgb {1 0 0}
 addUserKnob {6 maskcolorrgb_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
 addUserKnob {41 MaskColor l INVISIBLE +INVISIBLE T Multiply1.value}
 addUserKnob {6 mask_1_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
 addUserKnob {20 endGroup_3 l endGroup n -1}
 addUserKnob {26 ""}
 addUserKnob {41 which l Mix T DissolveMask.which}
 addUserKnob {6 invrt l "Use Mask" -STARTLINE}
 addUserKnob {26 "" +STARTLINE}
 addUserKnob {26 ver l "" +STARTLINE T "<font color=gray>Aberration by Jason Bidwell v1.3"}
}
 Input {
  inputs 0
  name Image
  xpos 828
  ypos -326
 }
set N5eac5270 [stack 0]
 Dot {
  name Dot3
  xpos 939
  ypos 428
 }
set N5eac91d0 [stack 0]
push $N5eac91d0
push $N5eac91d0
 Input {
  inputs 0
  name Mask
  xpos 263
  ypos 274
  number 1
 }
 Roto {
  curves {{{v x3f99999a}
  {f 0}
  {n
   {layer Root
    {f 512}
    {t x44700000 x44070000}
    {a}}}}}
  toolbox {createBezier {
  { 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 }
  { 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_brush_hardness 0.200000003
  toolbar_source_transform_scale {1 1}
  toolbar_source_transform_center {320 240}
  view {}
  motionblur_on true
  name Roto1
  xpos 263
  ypos 300
 }
 Invert {
  channels rgba
  clamp true
  name Invert1
  xpos 263
  ypos 326
  disable {{invrt==0}}
 }
push $N5eac5270
push $N5eac5270
 Radial {
  cliptype none
  replace true
  area {{curve i} {curve i} {input0.width i} {input0.height i}}
  name Radial1
  xpos -540
  ypos -278
 }
 Invert {
  channels rgba
  name Invert2
  xpos -540
  ypos -252
 }
set N5f3093b0 [stack 0]
 Dot {
  name Dot2
  xpos -506
  ypos 402
 }
push $N5eac5270
 Radial {
  cliptype none
  replace true
  area {{curve} {curve} {input0.width} {input0.height}}
  name Radial2
  xpos 102
  ypos -185
 }
 Transform {
  scale {{scaleMask}}
  center {{input0.width/2} {input.height/2}}
  name scale_mask
  xpos 102
  ypos -159
 }
 Clamp {
  channels rgba
  name Clamp1
  xpos 102
  ypos -133
 }
 FilterErode {
  channels rgba
  size {{-1*maskErode}}
  name FilterErode1
  xpos 102
  ypos -102
 }
 Blur {
  channels rgba
  size {{maskSoft}}
  name Blur4
  xpos 102
  ypos -76
 }
set N5f2373a0 [stack 0]
push $N5eac5270
 Shuffle {
  alpha white
  name Shuffle1
  label "\[knob in]"
  xpos 276
  ypos -105
 }
set N5f2429f0 [stack 0]
 Shuffle {
  green red
  blue red
  alpha white
  name ShuffleRed1
  xpos 153
  ypos 22
 }
 Merge2 {
  inputs 2
  operation mask
  name Merge7
  xpos 102
  ypos 73
 }
push $N5f3093b0
 Transform {
  translate {{curve R 0 1} {curve R 0 1}}
  rotate {{curve R 0 1}}
  center {960 540}
  motionblur 1
  shutteroffset centred
  name vectorGen
  xpos -482
  ypos 147
 }
set N5f269ae0 [stack 0]
push $N5f3093b0
push $N5eac5270
 Grade {
  multiply {{1/parent.channelSelectOffst.multiply}}
  black_clamp false
  name Grade1
  xpos -202
  ypos -216
 }
 Grade {
  multiply 34516
  black_clamp false
  name channelSelectOffst
  xpos -202
  ypos -190
 }
set N44cb9e0 [stack 0]
 Shuffle {
  green red
  blue red
  alpha red
  name ShuffleRed
  xpos -352
  ypos -120
 }
 Transform {
  translate {{abbrX*red} {abbrY*red}}
  rotate {{abbrRot*(red/10)}}
  center {{input0.width/2} {input0.height/2}}
  filter Mitchell
  clamp true
  black_outside false
  name abbr_red
  xpos -352
  ypos -94
 }
 Transform {
  skewX {{abrTop*red}}
  center {{input0.width/2} 0}
  name abrTop2
  xpos -352
  ypos -68
 }
 Transform {
  skewX {{abrBtm*red}}
  center {{input0.width/2} {input0.height}}
  name abrBottom2
  xpos -352
  ypos -42
 }
 GodRays {
  channels rgb
  scale {{1+abbrRad*(red/100)}}
  center {{input0.width/2} {input0.height/2}}
  steps 10
  name RadialAbbr1
  xpos -352
  ypos 62
 }
 Blur {
  inputs 1+1
  channels rgb
  size {{soft*red i}}
  name Blur1
  xpos -352
  ypos 88
  disable {{usmask==0 i}}
 }
 MotionBlur2D {
  inputs 2
  shutteroffset centred
  name MotionBlur2D1
  xpos -352
  ypos 219
 }
 VectorBlur {
  channels rgb
  uv forward
  scale {{blend*(red/100)}}
  name OpticalBlur1
  xpos -352
  ypos 245
 }
 Merge2 {
  inputs 2
  name Merge4
  xpos -352
  ypos 302
  disable {{cntrMask==0}}
 }
 Dot {
  name Dot1
  xpos -318
  ypos 335
 }
push $N5f2373a0
push $N5f2429f0
 Shuffle {
  red green
  blue green
  alpha white
  name ShuffleGreen1
  tile_color 0x2e7435ff
  xpos 240
  ypos 95
 }
 Merge2 {
  inputs 2
  operation mask
  name Merge6
  xpos 203
  ypos 133
 }
push $N5f269ae0
push $N5f3093b0
push $N44cb9e0
 Shuffle {
  red green
  blue green
  alpha green
  name ShuffleGreen
  tile_color 0x2e7435ff
  xpos -202
  ypos -100
 }
 Transform {
  translate {{abbrX*grn} {abbrY*grn}}
  rotate {{abbrRot*(grn/10)}}
  center {{input0.width/2} {input0.height2}}
  filter Mitchell
  clamp true
  black_outside false
  name abbr_green
  xpos -202
  ypos -74
 }
 Transform {
  skewX {{abrTop*grn}}
  center {{input0.width/2} 0}
  name abrTop1
  xpos -202
  ypos -48
 }
 Transform {
  skewX {{abrBtm*grn}}
  center {{input0.width/2} {input0.height}}
  name abrBottom1
  xpos -202
  ypos -22
 }
 GodRays {
  channels rgb
  scale {{1+abbrRad*(grn/100)}}
  center {{input0.width/2} {input0.height/2}}
  steps 10
  name RadialAbbr2
  xpos -202
  ypos 68
 }
 Blur {
  inputs 1+1
  channels rgb
  size {{soft*grn}}
  name Blur2
  xpos -202
  ypos 217
  disable {{usmask==0}}
 }
 MotionBlur2D {
  inputs 2
  shutteroffset centred
  name MotionBlur2D2
  xpos -202
  ypos 241
 }
 VectorBlur {
  channels rgb
  uv forward
  scale {{blend*(grn/100)}}
  name OpticalBlur2
  xpos -202
  ypos 265
 }
 Merge2 {
  inputs 2
  name Merge3
  xpos -202
  ypos 305
  disable {{cntrMask==0}}
 }
 ShuffleCopy {
  inputs 2
  red red
  blue black
  alpha black
  name ShuffleCopy1
  xpos -202
  ypos 331
 }
push $N5f2373a0
push $N5f2429f0
 Shuffle {
  red blue
  green blue
  alpha white
  name ShuffleBlue1
  tile_color 0x1b4274ff
  xpos 356
  ypos 82
 }
 Merge2 {
  inputs 2
  operation mask
  name Merge1
  xpos 356
  ypos 126
 }
push $N5f269ae0
push $N5f3093b0
push $N44cb9e0
 Shuffle {
  red blue
  green blue
  alpha blue
  name ShuffleBlue
  tile_color 0x1b4274ff
  xpos -26
  ypos -96
 }
 Transform {
  translate {{abbrX*blu} {abbrY*blu}}
  rotate {{abbrRot*(blu/10)}}
  center {{input0.width/2} {input0.height/2}}
  filter Rifman
  clamp true
  black_outside false
  name abbr_blue
  xpos -26
  ypos -70
 }
 Transform {
  skewX {{abrTop*blu}}
  center {{input0.width/2} 0}
  name abrTop
  xpos -26
  ypos -44
 }
 Transform {
  skewX {{abrBtm*blu}}
  center {{input0.width/2} {input0.height}}
  name abrBottom
  xpos -26
  ypos -18
 }
 GodRays {
  channels rgb
  scale {{1+abbrRad*(blu/100)}}
  center {{input0.width/2} {input0.height/2}}
  steps 10
  name RadialAbbr3
  xpos -26
  ypos 66
 }
 Blur {
  inputs 1+1
  channels rgb
  size {{soft*blu x1 11.55}}
  name Blur3
  xpos -26
  ypos 92
  disable {{usmask==0}}
 }
 MotionBlur2D {
  inputs 2
  shutteroffset centred
  name MotionBlur2D3
  xpos -26
  ypos 219
 }
 VectorBlur {
  channels rgb
  uv forward
  scale {{blend*(blu/100)}}
  name OpticalBlur3
  xpos -26
  ypos 245
 }
 Merge2 {
  inputs 2
  name Merge2
  xpos -26
  ypos 305
  disable {{cntrMask==0}}
 }
 ShuffleCopy {
  inputs 2
  red red
  green green
  alpha black
  name ShuffleCopy2
  xpos -26
  ypos 331
 }
 Sharpen {
  inputs 1+1
  channels rgb
  amount 5
  size {{soft*grn/2}}
  crop false
  mix 0.5
  name Sharpen1
  xpos -26
  ypos 399
  disable {{usmask==0 x1 1 1}}
 }
 Crop {
  box {0 0 {Image.width} {Image.height}}
  reformat true
  crop false
  name Crop6
  xpos -26
  ypos 423
 }
 Dissolve {
  inputs 2+1
  which 1
  name Dissolve1
  xpos 341
  ypos 394
 }
push $N5eac5270
 Dissolve {
  inputs 2
  channels rgba
  which 1
  name DissolveMask
  xpos 502
  ypos 398
 }
set N5f5f5e70 [stack 0]
push $N5f2373a0
 Multiply {
  channels rgba
  value {{parent.maskcolorrgb.r} {parent.maskcolorrgb.g} {parent.maskcolorrgb.b} 1}
  name Multiply1
  xpos 559
  ypos 160
 }
push $N5eac5270
 Merge2 {
  inputs 2
  name Merge5
  xpos 707
  ypos 199
 }
push $N5f5f5e70
 Switch {
  inputs 2
  which {{showMask}}
  name showMask
  label "\[value which]"
  xpos 648
  ypos 388
  disable {{"\$gui==0"}}
 }
 Switch {
  inputs 2
  which {{cntrMask==0}}
  name Switch1
  label "\[value which]"
  xpos 648
  ypos 439
 }
 ShuffleCopy {
  inputs 2
  in rgb
  in2 rgb
  red red
  alpha black
  name red_bypass
  xpos 796
  ypos 501
  disable {{parent.redBypass==0}}
 }
 ShuffleCopy {
  inputs 2
  in rgb
  in2 rgb
  blue blue
  alpha black
  name blue_bypass
  tile_color 0x3f5493ff
  xpos 796
  ypos 525
  disable {{parent.blueBypass==0}}
 }
 ShuffleCopy {
  inputs 2
  in rgb
  in2 rgb
  green green
  alpha black
  name green_bypass
  tile_color 0x128502ff
  xpos 796
  ypos 549
  disable {{parent.greenBypass==0}}
 }
push $N5eac91d0
 Copy {
  inputs 2
  from0 rgba.red
  to0 rgba.red
  from1 rgba.green
  to1 rgba.green
  from2 rgba.blue
  to2 rgba.blue
  name Copy1
  selected true
  xpos 917
  ypos 549
 }
set N5f650d80 [stack 0]
 Crop {
  box {{curve} {curve} {input0.width} {input0.height}}
  reformat true
  crop false
  name Crop1
  xpos 1054
  ypos 645
 }
 Output {
  name Output1
  xpos 1054
  ypos 726
 }
push $N5f650d80
 Viewer {
  frame_range 1-100
  colour_sample_bbox {0.134375006 -1.293750048 0.137500003 -1.290624976}
  name Viewer1
  xpos 1201
  ypos 595
 }
end_group
