Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (54 sloc) 1.21 KB
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name BinaryAlpha
tile_color 0x2a2a2aff
label "(\[value an] --> \[value output1])"
note_font Verdana
note_font_color 0xfffff9ff
selected true
xpos 572
ypos 723
addUserKnob {20 BinaryAlpha}
addUserKnob {4 an l Analyze: M {rgb rgba alpha "" "" ""}}
addUserKnob {4 output1 l Output: M {rgba alpha "" "" "" ""}}
output1 alpha
addUserKnob {20 info l Info}
addUserKnob {26 creator l Creator: T "<b><big>Tony Lyons"}
addUserKnob {26 desc l Description: t "Analyzes channel input and creates a binary result 0 or 1 and outputs it into output channel" T BinaryAlpha}
addUserKnob {26 ver l Version: T v03}
}
Input {
inputs 0
name Input
xpos -398
ypos 275
}
Expression {
temp_name0 rgb_an
temp_expr0 "r !=0 || g!=0 || b!=0?1:0"
temp_name1 rgba_an
temp_expr1 "r!=0 || g!=0 || b!=0 || a!=0?1:0"
temp_name2 alpha_an
temp_expr2 a!=0?1:0
expr3 "parent.an == 0 ? rgb_an : parent.an == 1 ? rgba_an : alpha_an"
name Expression
xpos -398
ypos 341
}
Shuffle {
red alpha
green alpha
blue alpha
name Shuffle
label "\[value in]"
xpos -398
ypos 367
disable {{parent.output1}}
}
Output {
name Output1
xpos -398
ypos 456
}
end_group
You can’t perform that action at this time.