diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-01-05 18:16:18 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-01-05 18:34:55 +0300 |
commit | 9dbea1db66da5e277e8279811d66096751f38d29 (patch) | |
tree | 4fe64c2cb671e0c08f91a37d80c180689c9dec1d /source/blender/makesdna/DNA_node_types.h | |
parent | 357e519575411cc338acfe899fde6e5ea3476801 (diff) |
Compositor: Alpha Mode
{D9211} introduced pre-multiplying the color for the keying node. This
pre-multiplication should also be done by other keying nodes and should be
the default operation for alpha node.
This patch will change the logic of keying nodes (Cryptomatte Node,
Channel Matte, Chroma Matte, Color Matte, Difference Matte, Distance
Matte, Luminance Matte) and breaks old files.
The Set alpha node has a mode parameter. This parameter changes
the logic to `Apply Mask` the alpha on the RGBA channels of the input color
or only replace the alpha channel (old behavior).
The replace mode is automatically set for older files. When adding
new files the the multiply mode is set.
Reviewed By: Sergey Sharybin
Differential Revision: https://developer.blender.org/D9630
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 3b655790de9..f5d27ef3164 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -835,6 +835,11 @@ typedef struct NodeMask { int size_x, size_y; } NodeMask; +typedef struct NodeSetAlpha { + char mode; + char _pad[7]; +} NodeSetAlpha; + typedef struct NodeTexBase { TexMapping tex_mapping; ColorMapping color_mapping; @@ -1468,6 +1473,13 @@ enum { CMP_NODEFLAG_STABILIZE_INVERSE = 1, }; +/* Set Alpha Node. */ +/* `NodeSetAlpha.mode` */ +typedef enum CMPNodeSetAlphaMode { + CMP_NODE_SETALPHA_MODE_APPLY = 0, + CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA = 1, +} CMPNodeSetAlphaMode; + #define CMP_NODE_PLANETRACKDEFORM_MBLUR_SAMPLES_MAX 64 /* Point Density shader node */ |