What does channel-locking means precisely ? You want to apply the filter only on some channels ?
If so, I’d suggest you add a parameter Channel(s)
in your parameter list and use command -apply_channels
(shortcut -ac
), as it is already done for other filters.
Should be as simple as adding:
#@gui : sep = separator(), Channel(s) = choice("All","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
#@gui : Value action = choice("None","Cut","Normalize")
and add a new command like that:
fx_hyperwarpplus :
-ac "-hyperwarpplus $*",$-2,$-1
(and put this new command as the command to execute for the filter).