diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mask_rasterize.c | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mask_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mask.c | 1 |
4 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index df38cc9571f..a088a91000c 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -156,6 +156,7 @@ MaskLayer *BKE_mask_layer_new(Mask *mask, const char *name) mask->masklay_tot++; + masklay->blend = MASK_BLEND_MERGE; masklay->alpha = 1.0f; return masklay; diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c index b05c1ad4eaa..da0070f0c09 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.c +++ b/source/blender/blenkernel/intern/mask_rasterize.c @@ -1251,6 +1251,9 @@ float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float x } switch (layer->blend) { + case MASK_BLEND_MERGE: + value += value_layer * (1.0f - value); + break; case MASK_BLEND_ADD: value += value_layer; break; diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h index 60bc3ee0ffc..e7322263a6b 100644 --- a/source/blender/makesdna/DNA_mask_types.h +++ b/source/blender/makesdna/DNA_mask_types.h @@ -173,7 +173,8 @@ enum { MASK_BLEND_DARKEN = 3, MASK_BLEND_MUL = 4, MASK_BLEND_REPLACE = 5, - MASK_BLEND_DIFFERENCE = 6 + MASK_BLEND_DIFFERENCE = 6, + MASK_BLEND_MERGE = 7 }; /* masklay->blend_flag */ diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index d197936f35e..2d972d26398 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -573,6 +573,7 @@ static void rna_def_maskSpline(BlenderRNA *brna) static void rna_def_mask_layer(BlenderRNA *brna) { static EnumPropertyItem masklay_blend_mode_items[] = { + {MASK_BLEND_MERGE, "MERGE", 0, "Merge", ""}, {MASK_BLEND_ADD, "ADD", 0, "Add", ""}, {MASK_BLEND_SUBTRACT, "SUBTRACT", 0, "Subtract", ""}, {MASK_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", ""}, |