Group { name AlphaDensity help "Tool for controlling the density of the alpha. " selected true xpos -116 ypos -191 addUserKnob {20 User l "Alpha Density"} addUserKnob {7 density l "Alpha Density" t "0 = no change\n100 = fully white alpha\n-100 = fully black alpha" R -100 100} addUserKnob {26 info l "" +STARTLINE} addUserKnob {26 creator l "" +STARTLINE T "Kenn Hedin Kalvik"} addUserKnob {26 version l "" +STARTLINE T "Alpha Density v1.0 | 2023"} addUserKnob {26 website l "" +STARTLINE T "www.keheka.com"} } Input { inputs 0 name Inputalpha xpos 52 ypos -316 } Dot { name Dot3 xpos 86 ypos -261 } set N7162000 [stack 0] Dot { name Dot2 xpos -36 ypos -261 } Gamma { channels alpha value {{"(100 + parent.density) / 100"}} name Gamma2 xpos -70 ypos -147 } Dot { name Dot1 xpos -36 ypos -8 } push $N7162000 Invert { channels alpha name Invert1 xpos 52 ypos -216 } Gamma { channels alpha value {{"(100 - parent.density) / 100"}} name Gamma1 xpos 52 ypos -148 } Invert { channels alpha name Invert2 xpos 52 ypos -83 } Switch { inputs 2 which {{"! (parent.density >= 0) "}} name Switch1 xpos 52 ypos -12 } Clamp { channels alpha name Clamp1 xpos 52 ypos 44 } Output { name Output1 xpos 52 ypos 111 } end_group