diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-10-29 11:45:28 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-10-29 11:45:28 +0300 |
commit | 110d6a5130d4fc6bcaa4bb7a311d7819f63d681d (patch) | |
tree | 7708bc39a2f978d15c901c8ee52514554122aacd | |
parent | e78ded8b0f8cf69fea29651df7bc82e5ebf63d7f (diff) | |
parent | 3fc97727df6d09636072ca884ab90cb3d9bca6f6 (diff) |
Merge branch 'blender-v2.91-release'
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 9 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color_blend_inline.c | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 466a0115a9d..d762b1b0604 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -751,6 +751,7 @@ static void layerCopyValue_mloopcol(const void *source, m2->r = m1->r; m2->g = m1->g; m2->b = m1->b; + m2->a = m1->a; } else { /* Modes that support 'real' mix factor. */ unsigned char src[4] = {m1->r, m1->g, m1->b, m1->a}; @@ -771,13 +772,14 @@ static void layerCopyValue_mloopcol(const void *source, else { memcpy(tmp_col, src, sizeof(tmp_col)); } + blend_color_interpolate_byte(dst, dst, tmp_col, mixfactor); m2->r = (char)dst[0]; m2->g = (char)dst[1]; m2->b = (char)dst[2]; + m2->a = (char)dst[3]; } - m2->a = m1->a; } static bool layerEqual_mloopcol(const void *data1, const void *data2) @@ -1281,7 +1283,7 @@ static void layerCopyValue_propcol(const void *source, return; /* Do Nothing! */ } } - copy_v3_v3(m2->color, m1->color); + copy_v4_v4(m2->color, m1->color); } else { /* Modes that support 'real' mix factor. */ if (mixmode == CDT_MIX_MIX) { @@ -1301,9 +1303,8 @@ static void layerCopyValue_propcol(const void *source, } blend_color_interpolate_float(m2->color, m2->color, tmp_col, mixfactor); - copy_v3_v3(m2->color, m1->color); + copy_v4_v4(m2->color, m1->color); } - m2->color[3] = m1->color[3]; } static bool layerEqual_propcol(const void *data1, const void *data2) diff --git a/source/blender/blenlib/intern/math_color_blend_inline.c b/source/blender/blenlib/intern/math_color_blend_inline.c index eb82bb81a89..7ad4f0d9585 100644 --- a/source/blender/blenlib/intern/math_color_blend_inline.c +++ b/source/blender/blenlib/intern/math_color_blend_inline.c @@ -606,6 +606,7 @@ MINLINE void blend_color_interpolate_byte(uchar dst[4], } else { copy_v4_v4_uchar(dst, src1); + dst[3] = 0; } } |