From c014021802c323c3ed55c3c283717975a3d93edf Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Wed, 10 Aug 2022 10:21:18 +0200 Subject: Realtime Compositor: Add basic matte nodes This patch implements the following nodes for the realtime compositor: - Box mask node. - Channel matte node. - Chroma matte node. - Color matte node. - Color spill node. - Difference matte node. - Distance matte node. - Ellipse matte node. - Luminance matte node. Differential Revision: https://developer.blender.org/D15230 Reviewed By: Clement Foucault --- source/blender/makesdna/DNA_node_types.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_node_types.h') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index b60d69bcd8a..db735cf1b00 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -632,12 +632,12 @@ typedef struct bNodeSocketValueMaterial { /* Data structs, for `node->storage`. */ -enum { +typedef enum CMPNodeMaskType { CMP_NODE_MASKTYPE_ADD = 0, CMP_NODE_MASKTYPE_SUBTRACT = 1, CMP_NODE_MASKTYPE_MULTIPLY = 2, CMP_NODE_MASKTYPE_NOT = 3, -}; +} CMPNodeMaskType; enum { CMP_NODE_DILATEERODE_STEP = 0, @@ -1856,6 +1856,24 @@ typedef enum CMPNodeAlphaConvertMode { CMP_NODE_ALPHA_CONVERT_UNPREMULTIPLY = 1, } CMPNodeAlphaConvertMode; +/* Distance Matte Node. Stored in NodeChroma.channel. */ +typedef enum CMPNodeDistanceMatteColorSpace { + CMP_NODE_DISTANCE_MATTE_COLOR_SPACE_YCCA = 0, + CMP_NODE_DISTANCE_MATTE_COLOR_SPACE_RGBA = 1, +} CMPNodeDistanceMatteColorSpace; + +/* Color Spill Node. Stored in custom2. */ +typedef enum CMPNodeColorSpillLimitAlgorithm { + CMP_NODE_COLOR_SPILL_LIMIT_ALGORITHM_SINGLE = 0, + CMP_NODE_COLOR_SPILL_LIMIT_ALGORITHM_AVERAGE = 1, +} CMPNodeColorSpillLimitAlgorithm; + +/* Channel Matte Node. Stored in NodeChroma.algorith. */ +typedef enum CMPNodeChannelMatteLimitAlgorithm { + CMP_NODE_CHANNEL_MATTE_LIMIT_ALGORITHM_SINGLE = 0, + CMP_NODE_CHANNEL_MATTE_LIMIT_ALGORITHM_MAX = 1, +} CMPNodeChannelMatteLimitAlgorithm; + /* Plane track deform node. */ enum { -- cgit v1.2.3