The Distance Node in 2.49/2.5/2.6 pre-tiles has a different calculation for RGB and...
authorDalai Felinto <dfelinto@gmail.com>
Sun, 19 Aug 2012 03:05:38 +0000 (03:05 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Sun, 19 Aug 2012 03:05:38 +0000 (03:05 +0000)
commit48eb27791bcd0b28b3fad384552009fa4b712d00
treecf5cd3bd86ec2c28a20c357ebb3176ad273a6675
parente4a6602a9ac9c7d43a882770f19323b6d5616a4b
The Distance Node in 2.49/2.5/2.6 pre-tiles has a different calculation for 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.
source/blender/compositor/CMakeLists.txt
source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp [moved from source/blender/compositor/operations/COM_DistanceMatteOperation.cpp with 73% similarity]
source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h [moved from source/blender/compositor/operations/COM_DistanceMatteOperation.h with 84% similarity]
source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h [new file with mode: 0644]