This merges all mix operations into a COM_MixBaseOperation
(naming could be better, but this way it corresponds to what's
going on with math operations.
Same was done with RenderLayers operations.
Overall this gives 20% of bf_compositor library compilation
time decrease. And it was rather annoying to have tens of
files with just a single-line constructors anyway.
TODO:
- All Convert operations could also be merged into a single file,
but that would require adding some ConvertBaseOperation to
reduce code duplication (ideally). Leaving it unchanged for now.
- Some operations' headers seems to be wrongly including MixOperation
header, they need to include NodeOperation instead it seems.
This is rather harmless, but would be nice to doublecheck on this
eventually.
RGB and YCC. While RGB
calculate the distance in 3d between R,G and B, the YCC only takes Cb and Cr
into consideration.
This commit makes COM_DistanceMatteOperation inheritable and expose the calculate distance function
to be re-implemented for the YCC node operation.
Thanks Troy Sobotka for the report over email.
Patch incorporates review suggestions by Jeroen Bakker.